Description[Sync] Ensure isSyncable is set when signed in.
This is a more extensive version of http://crrev.com/1075343003 for
landing on trunk.
Previously, if isSyncable is false, but sync is enabled for Chrome,
even if you sign in, Chrome would never set syncable to true.
This CL ensures that syncable is always set to true if there is an
account signed in, regardless of whether chrome sync is enabled or not.
Additionally, it sets syncable to false when no account is signed in,
to ensure that the user does not see a non-functional switch in the
Android settings.
The new AccountManager setup in the test is necessary so that the test accounts can be cleaned up by the loop in updateSyncability().
BUG=475299
TEST=Regression tests added, plus:
Ensure that
$ adb shell dumpsys content | grep chrome
should show syncable=0 and enabled=true
Sign in to Chrome. Now dumpsys should say syncable=1 and enabled=true.
Review URL: https://codereview.chromium.org/1062973004
Note: this commit replaces 3d3e24b64e733b480b97352165b5cecd3b9ed145
(https://codereview.chromium.org/1075343003)
TBR=maxbogue@chromium.org
Cr-Commit-Position: refs/heads/master@{#326122}
(cherry picked from commit fd45731d49e2274221be3df2bd2fb3c8b0bed613)
Committed: https://chromium.googlesource.com/chromium/src/+/63fbaf9c76aa64eeae686ff88ec34ced52203bfe
Patch Set 1 #
Messages
Total messages: 2 (1 generated)
|