Comments

Clear directory-redundant prefs in additional codepaths
We observe discrepancies in UMA Sync.DirectoryVsPrefsConsistency that
suggest the relevant prefs outlive the directory content (bucket
CACHE_GUID_EMPTY_IN_DIRECTORY__BIRTHDAY_EMPTY_IN_DIRECTORY on desktop).
In order to rule out other sources of discrepancies, and although it's
questionable whether such fields should be reset in the affected
codepaths, we adopt the directory's logic and do more aggressive
clearing.
Since unrecoverable errors are rare, the main suspects are
STOP_SYNC_FOR_DISABLED_ACCOUNT and RESET_LOCAL_SYNC_DATA, which are
affected by this patch (in fact all codepaths).
Bug: 923285
Change-Id: Ibfff4c59e9221d1003f8b96007c9d0d05123c9a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1532030
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#642962}