Verify consistency between sync and sign-in account IDs
Local sync metadata belongs to one user account. Due to the distributed nature of the locally persisted sync metadata, the cache GUID is used as "epoch" to detect mismatched in edge cases like the browser crashing during shutdown and before I/O gets flushed. However, prior to this patch, the cache GUID itself has no safety mechanism to detect it maps to the intended account ID. In this patch, a new SyncPref is introduced to achieve that, in away that both prefs (cache GUID and account ID) are stored atomically. Because the pref is newly-introduced, migration logic is introduced to populate it for the first time if initially empty. Change-Id: I2cdd9f997077c4acd16e9283df8c025f51d40546 Bug: 1046237,1021527 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2023528Reviewed-by:Marc Treib <treib@chromium.org> Reviewed-by:
Mihai Sardarescu <msarda@chromium.org> Commit-Queue: Mikel Astiz <mastiz@chromium.org> Cr-Commit-Position: refs/heads/master@{#736848}
Showing
Please register or sign in to comment