Prepare SyncController to replace a downstream component.
commit0a04eaa8dcaaad67cbcfa41d40bc994cbc89ce0b
authormaxbogue <maxbogue@chromium.org>
Thu, 22 Jan 2015 02:25:32 +0000 (21 18:25 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 22 Jan 2015 02:27:19 +0000 (22 02:27 +0000)
treefd302db552bf6bcb6f8d01e58d31c9068e0e2267
parent29e41141428199096695bcf97833403214da808a
Prepare SyncController to replace a downstream component.

SyncController handles the coordination of sync state
between the invalidation controller, the Android sync
settings, and the native sync code. Sync state can be
changed from four places:

- The Chrome UI, which will call SyncController directly.
- Native sync, which can disable it via a dashboard stop
  and clear.
- Android's Chrome sync setting.
- Android's master sync setting.

SyncController implements listeners for the last three
cases. When master sync is disabled, we are careful to not
change the Android Chrome sync setting so we know whether
to turn sync back on when it is re-enabled.

BUG=428882

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

Cr-Commit-Position: refs/heads/master@{#312533}
chrome/android/java/src/org/chromium/chrome/browser/sync/SyncController.java [moved from chrome/android/shell/java/src/org/chromium/chrome/shell/sync/SyncController.java with 62% similarity]
chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellActivity.java
chrome/android/shell/java/src/org/chromium/chrome/shell/sync/AccountChooserFragment.java
chrome/android/sync_shell/javatests/src/chromium/chrome/browser/sync/SyncTest.java