New issue
Advanced search Search tips

Issue 921598 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 796544



Sign in to add a comment

Clean up semantics of IdentityManager's observer callbacks for account being added and account information being updated

Project Member Reported by blundell@chromium.org, Jan 14

Issue description

ProfileOAuth2TokenService sends an observer callback when the refresh token for an account is first added. As part of that process, AccountTrackerService also sends callbacks if metadata is set on the account (e.g., it is set to have advanced protection status).

Once all clients of these observer callbacks are instead observing the equivalent IdentityManager callbacks, we should make the semantics of these callbacks sane wrt each other (from a comment by Mihai on ):

When we send OnRefreshTokenUpdatedForAccount(AccountInfo) to our observers, the account info should already contain all informations (email, gaia id, is under advanced protection status, child account if we decide to add it later)
We should not send any notifications about account updated from the IdentityManager before we send OnRefreshTokenUpdatedForAccount. For me, the first OnRefreshTokenUpdatedForAccount identifies the moment when an account was added.

Making these changes will require going through all clients of the IdentityManager equivalent to the AccountTrackerService callback to make sure that they work or can be made to work with the new semantics. This should be doable.
 
Cc: sdefresne@chromium.org

Sign in to add a comment