New issue
Advanced search Search tips

Issue 729590 link

Starred by 2 users

Issue metadata

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

Blocked on:
issue 729589
issue 809923

Blocking:
issue 654990



Sign in to add a comment

Eliminate AccountTracker

Project Member Reported by blundell@chromium.org, Jun 5 2017

Issue description

AccountTracker is not a class that we want to support in the Identity Service:
- It's not well-understood by the current chrome identity team
- It has functionality that overlaps in odd and hard-to-understand ways with the classes that *are* well-understood and invested in by the chrome identity team (ProfileOAuth2TokenService, AccountTrackerService).

As part of moving all consumers of signin code to instead consume the Identity Service, we need to eliminate AccountTracker, satisfying its use cases via mainstream signin classes like the above and/or by the Identity Service directly. See blocking bugs for a non-complete list of clients that need to be moved away from using AccountTracker.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 16 2017

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

commit fd8e7a2b81bcf21148850baf3cb77a299a1bc185
Author: Colin Blundell <blundell@chromium.org>
Date: Fri Jun 16 09:20:42 2017

Have Identity extension API impl find accountID via AccountTrackerService

As crbug.com/729590 details, we are looking to eliminate AccountTracker
entirely in favor of AccountTrackerService. As a step in that direction,
this CL eliminates the one usage of
AccountTracker::FindAccountIdsByGaiaId(), replacing it with equivalent
usage of AccountTrackerService. It updates the corresponding browsertests
to interact with AccountTrackerService rather than AccountTracker as well.

Note that both AccountTracker and AccountTrackerService add an
account in response to receiving OAuth2TokenService::OnRefreshTokenAvailable(),
and both populate it with a GAIA ID in response to the user's info being
fetched. Hence this change should be a no-op behaviorally.

This CL also removes the now-unused function.

Bug: 729590,  729582 
Change-Id: Ideb1c4f0398d662ae6d0db04872474a52e3ef21d
Reviewed-on: https://chromium-review.googlesource.com/535524
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#480001}
[modify] https://crrev.com/fd8e7a2b81bcf21148850baf3cb77a299a1bc185/chrome/browser/extensions/api/identity/identity_api.cc
[modify] https://crrev.com/fd8e7a2b81bcf21148850baf3cb77a299a1bc185/chrome/browser/extensions/api/identity/identity_api.h
[modify] https://crrev.com/fd8e7a2b81bcf21148850baf3cb77a299a1bc185/chrome/browser/extensions/api/identity/identity_apitest.cc
[modify] https://crrev.com/fd8e7a2b81bcf21148850baf3cb77a299a1bc185/chrome/browser/extensions/api/identity/identity_get_auth_token_function.cc
[modify] https://crrev.com/fd8e7a2b81bcf21148850baf3cb77a299a1bc185/google_apis/gaia/account_tracker.cc
[modify] https://crrev.com/fd8e7a2b81bcf21148850baf3cb77a299a1bc185/google_apis/gaia/account_tracker.h
[modify] https://crrev.com/fd8e7a2b81bcf21148850baf3cb77a299a1bc185/google_apis/gaia/account_tracker_unittest.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 23 2017

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

commit f635214c16cc19b3ff5cb4d563ab0c3ce0eae510
Author: Colin Blundell <blundell@chromium.org>
Date: Fri Jun 23 11:51:06 2017

Remove unused AccountTracker::Observer methods

As part of the move toward eliminating AccountTracker entirely (see bug),
this CL removes two AccountTracker::Observer methods that are
essentially unused in the codebase (their one production implementation
simply uses them to print logging messages, which could happen just as
easily in AccountTracker itself if needed).

The third method (OnSignInChanged()) is actually used. Eliminating this
method will likely require porting its consumers to observe the
OAuth2TokenService instead.

TBR=rockot@chromium.org

Bug: 729590
Change-Id: I2300f83e8f402ac54783eae212efc8debe598e0b
Reviewed-on: https://chromium-review.googlesource.com/538618
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: Nicolas Zea <zea@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481852}
[modify] https://crrev.com/f635214c16cc19b3ff5cb4d563ab0c3ce0eae510/chrome/browser/extensions/api/identity/identity_api.cc
[modify] https://crrev.com/f635214c16cc19b3ff5cb4d563ab0c3ce0eae510/chrome/browser/extensions/api/identity/identity_api.h
[modify] https://crrev.com/f635214c16cc19b3ff5cb4d563ab0c3ce0eae510/components/gcm_driver/gcm_account_tracker.cc
[modify] https://crrev.com/f635214c16cc19b3ff5cb4d563ab0c3ce0eae510/components/gcm_driver/gcm_account_tracker.h
[modify] https://crrev.com/f635214c16cc19b3ff5cb4d563ab0c3ce0eae510/google_apis/gaia/account_tracker.cc
[modify] https://crrev.com/f635214c16cc19b3ff5cb4d563ab0c3ce0eae510/google_apis/gaia/account_tracker.h
[modify] https://crrev.com/f635214c16cc19b3ff5cb4d563ab0c3ce0eae510/google_apis/gaia/account_tracker_unittest.cc

Components: Services>SignIn
Components: Internals>Services>Identity
Blockedon: 809923
Project Member

Comment 6 by bugdroid1@chromium.org, Apr 10 2018

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

commit 5395b4759b6915e131d3d4032edcea925952da5d
Author: Colin Blundell <blundell@chromium.org>
Date: Tue Apr 10 09:02:26 2018

[google_apis] clang-format AccountTracker

This CL is in preparation for moving this code into its only remaining
consumer, which triggers a presubmit error that the code needs
formatting.

Bug: 729590
Change-Id: I64246c2cca6f44a4ce60573ff6283c0f0c4b6d72
Reviewed-on: https://chromium-review.googlesource.com/1004614
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549459}
[modify] https://crrev.com/5395b4759b6915e131d3d4032edcea925952da5d/google_apis/gaia/account_tracker.cc
[modify] https://crrev.com/5395b4759b6915e131d3d4032edcea925952da5d/google_apis/gaia/account_tracker.h
[modify] https://crrev.com/5395b4759b6915e131d3d4032edcea925952da5d/google_apis/gaia/account_tracker_unittest.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 19 2018

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

commit 021e3e4d708a695a7714daf1eae89cbfa4a07708
Author: Colin Blundell <blundell@chromium.org>
Date: Thu Apr 19 01:03:24 2018

Move gaia::AccountTracker into //components/gcm_driver

This class is deprecated and slated for removal. It now has only one
remaining consumer. This CL moves it into the directory of that consumer,
with followup merging it into the code of that consumer.

This CL also excludes AccountTracker and GCMAccountTracker from the
build on Android, as they're not used on that platform.

Bug: 729590,  809923 
Change-Id: I225edf86a3af293779a8cc231ffffac711f22246
Reviewed-on: https://chromium-review.googlesource.com/1002845
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551904}
[modify] https://crrev.com/021e3e4d708a695a7714daf1eae89cbfa4a07708/components/gcm_driver/BUILD.gn
[rename] https://crrev.com/021e3e4d708a695a7714daf1eae89cbfa4a07708/components/gcm_driver/account_tracker.cc
[rename] https://crrev.com/021e3e4d708a695a7714daf1eae89cbfa4a07708/components/gcm_driver/account_tracker.h
[rename] https://crrev.com/021e3e4d708a695a7714daf1eae89cbfa4a07708/components/gcm_driver/account_tracker_unittest.cc
[modify] https://crrev.com/021e3e4d708a695a7714daf1eae89cbfa4a07708/components/gcm_driver/gcm_account_tracker.cc
[modify] https://crrev.com/021e3e4d708a695a7714daf1eae89cbfa4a07708/components/gcm_driver/gcm_account_tracker.h
[modify] https://crrev.com/021e3e4d708a695a7714daf1eae89cbfa4a07708/components/gcm_driver/gcm_account_tracker_unittest.cc
[modify] https://crrev.com/021e3e4d708a695a7714daf1eae89cbfa4a07708/components/gcm_driver/gcm_profile_service.cc
[modify] https://crrev.com/021e3e4d708a695a7714daf1eae89cbfa4a07708/google_apis/BUILD.gn

Sign in to add a comment