commit | 232ad148dd37516875ee779c96df09f2a70a6fe6 | [log] [tgz] |
---|---|---|
author | Rushan Suleymanov <rushans@google.com> | Fri Feb 07 13:48:58 2020 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Feb 07 13:48:58 2020 |
tree | 0f842df852b6b28f9167e76df4972a82a72c94aa | |
parent | 929655db3ae93a37ba44e63e9a8754df84365c3b [diff] |
Revert "Unify clearing of sync prefs" This reverts commit 44d3aa82c83566d5d64d2ae4c297b0510f4072b0. Reason for revert: suspect of running into sync protocol violations and the corresponding DCHECK failures. Original change's description: > Unify clearing of sync prefs > > SyncPrefs is a thin layer on top of preferences and hosts two groups > of preferences: > 1) Actual user-facing settings, such as type-selection, exposed via > SyncUserSettings. > 2) Local "bookkeeping" sync metadata, such the last synced time or the > client ID (cache GUID). > > In addition, there are two cases that fall somewhere in the middle, > whose behavior is changed in this patch: > a) FirstSetupComplete: which roughly represents the user having > consented to sync-the-feature (as opposed to transport-only upon > sign-in without explicit user consent). > b) The encryption-bootstrap-token: which represent an explicit > passphrase (usually custom passphrase) entered by the user, that > allows decrypting the incoming sync changes and encrypt outgoing > ones. > > The last two preferences above fit group 1 better, so this patch stops > clearing them in SyncPrefs::ClearPreferences(), now renamed to > SyncPrefs::ClearLocalSyncTransportData(). > > With such cleanup, what used to be > ClearDirectoryConsistencyPreferences() is now merged into a single > clearing function, ClearLocalSyncTransportData(), and all calling sites > are unified by directly clearing prefs in ShutdownImpl(DISABLE_SYNC), as > opposed to individual calling sites. > > This introduces -arguably desirable- behavioral changes because > codepaths like RESET_LOCAL_SYNC_DATA or STOP_SYNC_FOR_DISABLED_ACCOUNT > now actually clear all local metadata, which most notably includes > keystore keys. > > Change-Id: I2c42f98c4e068c7e340580d0b78a5cd5b5c46171 > Bug: 1046237 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2023649 > Commit-Queue: Mikel Astiz <mastiz@chromium.org> > Reviewed-by: Marc Treib <treib@chromium.org> > Cr-Commit-Position: refs/heads/master@{#735841} TBR=treib@chromium.org,mastiz@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 1046237, 1048771 Change-Id: I4ce9e941f12aa58b7b6b286e990e74a1e01dad69 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2043451 Commit-Queue: Rushan Suleymanov <rushans@google.com> Reviewed-by: Mikel Astiz <mastiz@chromium.org> Cr-Commit-Position: refs/heads/master@{#739374}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .