[Sync] Resend previously persisted consents when sync is reenabled.
This is a followup to https://chromium-review.googlesource.com/c/chromium/src/+/986514. After that CL, UserEventSyncBridge does not delete user consent events when sync is disabled, instead they are persisted in the store. In this CL, these user consent event are resubmitted to sync when sync is reenabled (based on OnSyncStarting call). This is done to avoid losing consents, especially in DICE where sync may be disabled frequently. On the other hand, it is allowed to record the same consent multiple times and this is heavily utilized in this CL. One could potentially come up with something simpler, however, later we will have to avoid syncing events emitted from a different account. Due to this requirement, the approach in this CL could not be simplified further. Bug: 781765 Change-Id: Ia1278d716b0ace05084f1de56f0647e149fd0e5e Reviewed-on: https://chromium-review.googlesource.com/1004896 Commit-Queue: vitaliii <vitaliii@chromium.org> Reviewed-by:Mikel Astiz <mastiz@chromium.org> Cr-Commit-Position: refs/heads/master@{#549888}
Showing
Please register or sign in to comment