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}