New issue
Advanced search Search tips

Issue 908840 link

Starred by 3 users

Issue metadata

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


Sign in to add a comment

☂ Port consumers of AccountTrackerService and AccountFetcherService to use IdentityManager

Project Member Reported by sdefresne@chromium.org, Nov 27

Issue description

Umbrella bug...
 
Blockedon: 908855
Blockedon: 908858
Discussed AccountTrackerService offline with blundell, and the following invariant should always be true (except during startup when PO2TS and ATS state is being loaded from disk):

  All accounts in AccountTrackerService should have a valid refresh token.

This is due to the following facts:

1. accounts are added in AccountTrackerService by calling SeedAccountInfo which is called after fetching the refresh token from gaia (this should always be true since the code requires a gaia id, which is obtained at the same time as refresh token)

2. accounts are removed from AccountTrackerService when accounts are removed from PO2TS (from AccountFetcherService::OnRefreshTokenRevoked)

3. after loading the refresh tokens, any account stored in AccountTrackerService for which PO2TS does not have valid refresh token is removed (see SigninManager::OnRefreshTokensLoaded).

Thus, we are going to assume that AccountTrackeRService only tracks accounts with valid refresh token (ideally it should be merged in PO2TS or at least should be owned by PO2TS).
Blockedon: 911675
Blockedon: 912170
Blockedon: 914783
Blockedon: 914805
Labels: -Pri-1 Pri-2
Moving to P2 to reflect that current milestone is for completing conversion of PO2TS/SigninManager.
Blockedon: 914861
Cc: sdefresne@chromium.org
 Issue 915150  has been merged into this issue.
Summary: ☂ Port consumers of AccountTrackerService and AccountFetcherService to use IdentityManager (was: ☂ Port consumers of AccountTrackerService to use IdentityManager)
Blockedon: 921061
Blockedon: 921063
Project Member

Comment 14 by bugdroid1@chromium.org, Jan 15

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

commit 317923340a7c8e3c021ba791157a48cc4c5deb61
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Tue Jan 15 13:22:45 2019

Move kAccountInfoPref to prefs namespace

The constant kAccountInfoPref (declared in AccountTrackerService) is
the name of a preference. Move it to the prefs namespace (since there
is already a singin_pref_names.h file) and rename it to kAccountInfo.

Also fix test code that register the pref to instead use the static
method of AccountTrackerService (this will make the code easier to
port to use IdentityTestEnvironment).

Bug: 908840
Change-Id: Ib24d07e841d291cdba109769d0cb4514903de84b
Reviewed-on: https://chromium-review.googlesource.com/c/1404164
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622835}
[modify] https://crrev.com/317923340a7c8e3c021ba791157a48cc4c5deb61/chrome/browser/chromeos/oauth2_token_service_delegate_unittest.cc
[modify] https://crrev.com/317923340a7c8e3c021ba791157a48cc4c5deb61/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate_unittest.cc
[modify] https://crrev.com/317923340a7c8e3c021ba791157a48cc4c5deb61/components/signin/core/browser/account_tracker_service.cc
[modify] https://crrev.com/317923340a7c8e3c021ba791157a48cc4c5deb61/components/signin/core/browser/account_tracker_service.h
[modify] https://crrev.com/317923340a7c8e3c021ba791157a48cc4c5deb61/components/signin/core/browser/account_tracker_service_unittest.cc
[modify] https://crrev.com/317923340a7c8e3c021ba791157a48cc4c5deb61/components/signin/core/browser/signin_manager_unittest.cc
[modify] https://crrev.com/317923340a7c8e3c021ba791157a48cc4c5deb61/components/signin/core/browser/signin_pref_names.cc
[modify] https://crrev.com/317923340a7c8e3c021ba791157a48cc4c5deb61/components/signin/core/browser/signin_pref_names.h
[modify] https://crrev.com/317923340a7c8e3c021ba791157a48cc4c5deb61/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate_unittest.mm

Blockedon: 922026

Comment 16 by sdefresne@chromium.org, Jan 16 (6 days ago)

Blockedon: 922472

Comment 17 by sdefresne@chromium.org, Jan 16 (6 days ago)

Blockedon: 922474

Comment 18 by sdefresne@chromium.org, Jan 16 (6 days ago)

Blockedon: 922475

Comment 19 by sdefresne@chromium.org, Jan 16 (6 days ago)

Blockedon: 922476

Comment 20 by sdefresne@chromium.org, Jan 16 (6 days ago)

Blockedon: 922477

Comment 21 by sdefresne@chromium.org, Jan 16 (6 days ago)

Blockedon: 922478

Comment 22 by sdefresne@chromium.org, Jan 16 (6 days ago)

Blockedon: 922479

Comment 23 by sdefresne@chromium.org, Jan 16 (6 days ago)

Blockedon: 922480

Comment 24 by dxie@google.com, Jan 17 (6 days ago)

Blockedon: 922803
Project Member

Comment 25 by bugdroid1@chromium.org, Yesterday (43 hours ago)

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

commit fe2c0b52a953d447ac238b5918abac2ab2187e7f
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Mon Jan 21 12:12:26 2019

Extract conversion from gaia response to AccountInfo to separate file

Move code to convert user info from gaia JSON response to an AccountInfo
out of AccountTrackerService to an helper method AccountInfoFromUserInfo()
with unit tests.

Move the constants used when values are missing (for hosted_domain and
picture_url) to the same file.

Bug: 908840
Change-Id: I484d24ce13d407190fd69b84a989a10909558356
Reviewed-on: https://chromium-review.googlesource.com/c/1400811
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: Varun Khaneja <vakh@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624561}
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/chrome/browser/chromeos/first_run/first_run.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/chrome/browser/chromeos/login/users/avatar/user_image_manager_browsertest.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/chrome/browser/profiles/gaia_info_update_service.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/chrome/browser/profiles/gaia_info_update_service_unittest.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/chrome/browser/profiles/profile_downloader.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/chrome/browser/profiles/profile_downloader_unittest.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/chrome/browser/profiles/profile_window.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/chrome/browser/safe_browsing/chrome_password_protection_service.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/chrome/browser/safe_browsing/chrome_password_protection_service_browsertest.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/chrome/browser/safe_browsing/chrome_password_protection_service_unittest.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/chrome/browser/signin/mutable_profile_oauth2_token_service_delegate_unittest.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/components/signin/core/browser/BUILD.gn
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/components/signin/core/browser/account_info.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/components/signin/core/browser/account_info.h
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/components/signin/core/browser/account_info_unittest.cc
[add] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/components/signin/core/browser/account_info_util.cc
[add] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/components/signin/core/browser/account_info_util.h
[add] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/components/signin/core/browser/account_info_util_unittest.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/components/signin/core/browser/account_tracker_service.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/components/signin/core/browser/account_tracker_service.h
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/components/signin/core/browser/account_tracker_service_unittest.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/components/signin/core/browser/signin_pref_names.cc
[modify] https://crrev.com/fe2c0b52a953d447ac238b5918abac2ab2187e7f/ios/chrome/browser/signin/authentication_service.mm

Sign in to add a comment