Commit 4a402acd authored by Jan Krcal's avatar Jan Krcal Committed by Commit Bot

[Sync] Explain rationale for priority user types

This CL adds comments that explain why each of the priority user data
types needs to be a priority type.

Bug: 1084969
Change-Id: Idcce308be557bbfa961705dad072ef3f85a99131
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2274599
Commit-Queue: Jan Krcal <jkrcal@chromium.org>
Auto-Submit: Jan Krcal <jkrcal@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#783920}
parent 5421f48f
...@@ -284,12 +284,29 @@ constexpr ModelTypeSet AlwaysEncryptedUserTypes() { ...@@ -284,12 +284,29 @@ constexpr ModelTypeSet AlwaysEncryptedUserTypes() {
return ModelTypeSet(PASSWORDS, WIFI_CONFIGURATIONS); return ModelTypeSet(PASSWORDS, WIFI_CONFIGURATIONS);
} }
// This is the subset of UserTypes() that have priority over other types. These // This is the subset of UserTypes() that have priority over other types. These
// types are synced before other user types. // types are synced before other user types (both for get_updates and commits).
// This mostly matters during initial sync, since priority types can become
// active before all the data for non-prio types has been downloaded (which may
// be a lot of data).
constexpr ModelTypeSet PriorityUserTypes() { constexpr ModelTypeSet PriorityUserTypes() {
return ModelTypeSet(DEVICE_INFO, PRIORITY_PREFERENCES, return ModelTypeSet(
SUPERVISED_USER_SETTINGS, SUPERVISED_USER_WHITELISTS, // The "Send to Your Devices" feature needs fast updating of the list of
OS_PRIORITY_PREFERENCES, SHARING_MESSAGE, THEMES); // your devices and also fast sending of the actual messages.
DEVICE_INFO, SHARING_MESSAGE,
// For supervised users, it is important to quickly deliver changes in
// settings and in allowed sites to the supervised user.
SUPERVISED_USER_SETTINGS, SUPERVISED_USER_WHITELISTS,
// These are by definition preferences for which it is important that the
// client picks them up quickly (also because these can get changed
// server-side). For example, such a pref could control whether a
// non-priority type gets enabled (Wallet has such a pref).
PRIORITY_PREFERENCES, OS_PRIORITY_PREFERENCES,
// Speed matters for the user experience when sync gets enabled directly
// in the creation flow for a new profile. If the user has no theme in
// their sync data, the browser offers a theme customization bubble which
// should appear soon after opening the browser.
THEMES);
} }
// Proxy types are placeholder types for handling implicitly enabling real // Proxy types are placeholder types for handling implicitly enabling real
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment