New issue
Advanced search Search tips

Issue 856170 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , iOS , Mac
Pri: 1
Type: Bug



Sign in to add a comment

[GCM] AccountTracker stores the Gaia ID in its AccountIds.email field on non-ChromeOS

Project Member Reported by blundell@chromium.org, Jun 25 2018

Issue description

AccountTracker has an AccountIds struct that stores information about Gaia accounts, supposedly the account ID, gaia ID, and email. However, it turns out that on non-ChromeOS platforms AccountTracker is populating the email field with the Gaia ID. The reason is that on notification that an account was added (via O2TS::Observer::OnRefreshTokenAvailable()), AccountTracker::StartTrackingAccount() creates a new AccountIds struct with both the account ID and email fields being populated from the account ID that was passed via OnRefreshTokenAvaiable()). On ChromeOS the account ID is the email address; however, on non-ChromeOS it is the Gaia ID.

This then extends to any clients of AccountTracker. In particular, GCMAccountTracker observes AccountTracker and takes its view of accounts' email addresses from AccountTracker's view. Thus, GCMAccountTracker's AccountInfo email field also stores the Gaia ID on non-ChromeOS.

This should be cleaned up one way or another, as it's just wrong in the codebase as it stands. Is the email address perhaps just unimportant in this context, given that this bug has existed for goodness knows how long without detection?
 

Sign in to add a comment