Rewrite AndroidSyncSettings to be significantly simpler.
commit2a1dd1c63c6e26f53120b4362dcaa8b8a9e830ae
authormaxbogue <maxbogue@chromium.org>
Thu, 26 Feb 2015 06:10:50 +0000 (25 22:10 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 26 Feb 2015 06:11:42 +0000 (26 06:11 +0000)
tree68cb9617b037ca74ed355e991d5adf97dfa72656
parentea328be16b456a4bd79a16579a3105858b8421d5
Rewrite AndroidSyncSettings to be significantly simpler.

The public methods no longer take an Account as a parameter.
Instead, when the account changes, updateAccount() is called
by ChromeSigninController. This removes the need for all of
the "didUpdate" logic.

Instead, updateCachedSettings() is called only when the
Android settings are changed or the account is changed.

CachedAccountSettings has been removed entirely. A separate
class is not necessary to cache three boolean values (which
it was already only handling two of!)

Review URL: https://codereview.chromium.org/879533004

Cr-Commit-Position: refs/heads/master@{#318196}
chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java
chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManager.java
chrome/android/java/src/org/chromium/chrome/browser/sync/SyncController.java
chrome/android/javatests/src/org/chromium/chrome/browser/invalidation/InvalidationControllerTest.java
chrome/android/javatests/src/org/chromium/chrome/browser/invalidation/InvalidationServiceTest.java
chrome/android/sync_shell/javatests/src/chromium/chrome/browser/sync/SyncTest.java
sync/android/java/src/org/chromium/sync/AndroidSyncSettings.java
sync/android/java/src/org/chromium/sync/signin/ChromeSigninController.java
sync/android/javatests/src/org/chromium/sync/AndroidSyncSettingsTest.java