Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync ModelTypeState: Extend initial_sync_done from bool to enum
Sync's ModelTypeState already contained a flag `initial_sync_done` which tracked whether the initial sync (download+merge) was completed for a data type. There are two special cases that aren't well covered by this: * CommitOnlyTypes: For these types, nothing gets downloaded and no merge happens. * ApplyUpdatesImmediatelyTypes: For these types, downloaded updates get applied immediately, without first waiting for the download cycle to complete. For these types, initial_sync_done is set to true after the first GetUpdates request returns. This CL adds a new enum field `initial_sync_state`, which has entries for the two special cases mentioned above, and adds logic to populate it, including migrating from the existing `initial_sync_done` flag. So far, the new enum/field isn't used yet - that will come in followup CLs. Bug: 1423338 Change-Id: Icaa913cfd1e8ade5241c118f9298fcd2aba76c39 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4329031 Commit-Queue: Marc Treib <treib@chromium.org> Reviewed-by: Mikel Astiz <mastiz@chromium.org> Cr-Commit-Position: refs/heads/main@{#1116474}
- Loading branch information
Marc Treib
authored and
Chromium LUCI CQ
committed
Mar 13, 2023
1 parent
cdc299e
commit ec5f57a
Showing
20 changed files
with
257 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.