New issue
Advanced search Search tips

Issue 598826 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

PasswordsPrivateAPI events behave weirdly

Project Member Reported by rdevlin....@chromium.org, Mar 29 2016

Issue description

The PasswordsPrivateAPI has code to notify a newly-added observer of the current state of what they're observing, but does so in such a way that it causes all existing listeners to also be notified.

See discussion on 
https://codereview.chromium.org/1833773002/diff/40001/chrome/browser/extensions/api/passwords_private/passwords_private_event_router.cc#newcode68
 
Cc: steve...@chromium.org
Components: UI>Settings
Labels: -OS-Linux OS-All
Owner: hcarmona@chromium.org
Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/de3ada6f945ac01d767ed68db95d17d1dec0d5f8

commit de3ada6f945ac01d767ed68db95d17d1dec0d5f8
Author: hcarmona <hcarmona@chromium.org>
Date: Thu Apr 21 20:43:01 2016

Add functions to the passwords private api that update the lists.

Making the update explicit will allow us to decouple listening and
updating of both lists.

BUG= 598826 

Review URL: https://codereview.chromium.org/1892613006

Cr-Commit-Position: refs/heads/master@{#388889}

[modify] https://crrev.com/de3ada6f945ac01d767ed68db95d17d1dec0d5f8/chrome/browser/extensions/api/passwords_private/passwords_private_api.cc
[modify] https://crrev.com/de3ada6f945ac01d767ed68db95d17d1dec0d5f8/chrome/browser/extensions/api/passwords_private/passwords_private_api.h
[modify] https://crrev.com/de3ada6f945ac01d767ed68db95d17d1dec0d5f8/chrome/browser/extensions/api/passwords_private/passwords_private_apitest.cc
[modify] https://crrev.com/de3ada6f945ac01d767ed68db95d17d1dec0d5f8/chrome/browser/extensions/api/passwords_private/passwords_private_delegate.h
[modify] https://crrev.com/de3ada6f945ac01d767ed68db95d17d1dec0d5f8/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc
[modify] https://crrev.com/de3ada6f945ac01d767ed68db95d17d1dec0d5f8/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.h
[modify] https://crrev.com/de3ada6f945ac01d767ed68db95d17d1dec0d5f8/chrome/common/extensions/api/passwords_private.idl
[modify] https://crrev.com/de3ada6f945ac01d767ed68db95d17d1dec0d5f8/chrome/test/data/extensions/api_test/passwords_private/test.js
[modify] https://crrev.com/de3ada6f945ac01d767ed68db95d17d1dec0d5f8/extensions/browser/extension_function_histogram_value.h
[modify] https://crrev.com/de3ada6f945ac01d767ed68db95d17d1dec0d5f8/third_party/closure_compiler/externs/passwords_private.js
[modify] https://crrev.com/de3ada6f945ac01d767ed68db95d17d1dec0d5f8/tools/metrics/histograms/histograms.xml

Is there any more work that we need here for the API?

API now:
  No notification when adding a listener
  Explicit update takes callback and doesn't trigger notifications to listeners
  Listeners are notified from changes in observed data
I think it is good now, thanks!

Status: Fixed (was: Started)

Sign in to add a comment