• James Cook's avatar
    chromeos: Add switch to allow login without setting primary account · f3534cc8
    James Cook authored
    Today, all Chrome OS users must consent to sync during login. For
    the SplitSettingsSync project we want to allow them to use their
    device without consenting to browser sync. However, Chrome OS
    always sets the IdentityManager primary account during login, which
    implies sync consent. We would like to switch to using the
    "unconsented" primary account, which exists whether or not the
    user has consented to sync.
    
    However, there are a large number of places in the Chrome OS code
    that use GetPrimaryAccount() to get the "main" user's account ID,
    email or tokens. Add a command line switch that skips setting the
    primary account during login and instead directly sets the
    "unconsented" primary account. This allows me to manually test
    to identify areas that need to change.
    
    Convert some login and ARC ToS code to use the unconsented
    primary account. This is a no-op if the switch isn't set, because
    without the switch the primary account and unconsented primary
    account are the same.
    
    Bug: 1042400
    Test: existing automated tests, also sign-in and ARC++ work on
          device without the switch set
    
    Change-Id: Idfeece6ac79b97a102111fb165062614a81f5a9a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2001018
    Commit-Queue: James Cook <jamescook@chromium.org>
    Reviewed-by: default avatarDavid Roger <droger@chromium.org>
    Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#734549}
    f3534cc8
chromeos_switches.h 13.3 KB