Defer initial_sync_done for commit-only types
Instead of assuming IsTrackingMetadata() as soon as the model is ready to sync, we now do it when: a) The model is ready to sync. b) Sync is known to be enabled (either because it just got enabled, or because we know from persisted data that is was previously enabled). This makes commit-only types more similar to regular types, and allows bridges to leverage the state. For example, while sync is enabled (i.e. IsTrackingMetadata()), there should always be means to know which account ID is syncing, which is now exposed in ModelTypeChangeProcessor. From the bridge's perspective, the only transition from not tracking metadata, and metadata being tracked (sync enabled), is MergeSyncData(). ModelReadyToSync() now presents the transition from unknown (i.e. unsure whether sync is enabled or not until sync metadata is read from disk) to true/false depending on the persisted value (true if sync was running for the datatype in previous executions of the browser). Just like for regular (non-commit-only) datatypes. Bug: 830535 Change-Id: I573e27c2dcde1bd5835c30319065c178eb7b4679 Reviewed-on: https://chromium-review.googlesource.com/c/1136307Reviewed-by:Olivier Robin <olivierrobin@chromium.org> Reviewed-by:
Markus Heintz <markusheintz@chromium.org> Reviewed-by:
vitaliii <vitaliii@chromium.org> Commit-Queue: Mikel Astiz <mastiz@chromium.org> Cr-Commit-Position: refs/heads/master@{#607207}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment