• James Cook's avatar
    cros: Migrate ArcAuthService to unconsented primary account · db21f388
    James Cook authored
    SplitSettingsSync will allow the user to opt-out of browser sync.
    However, IdentityAccessor::GetPrimaryAccountInfo() assumes the user has
    consented to browser sync. ARC has its own consent, unrelated to
    chrome browser sync consent. Switch to using the "unconsented"
    primary account. This account is always the main GAIA account for the
    signed-in user, and exists whether or not the user has consented
    to browser sync.
    
    This requires updating:
    * ArcAuthService
    * ArcSupportHost
    * ArcAndroidManagementChecker
    
    See go/cros-primary-account and go/cros-sync-mock for details.
    
    TBR=droger@chromium.org
    
    Bug: 1042400
    Test: updated existing unit tests and browser tests
    Test: Set --use-unconsented-primary-account and
      --enable-features=SplitSettingsSync and verify Play Store runs
      and is signed in after:
      * Login with consumer @gmail.com
      * Enroll to @google.com and signin with @google.com
      * Enroll to @managedchrome.com and signin with managed guest
    
    Change-Id: I48abe048a95d6aa234d4b87e76b2d70c5e88aebd
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2029307
    Commit-Queue: James Cook <jamescook@chromium.org>
    Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
    Reviewed-by: default avatarYury Khmel <khmel@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#737384}
    db21f388
arc_auth_service.cc 32.5 KB