Chromium Code Reviews
Descriptionsync: Introduce control data types
The Nigori node has always been treated specially. It is downloaded
during early sync initialization. It has custom encryption, update
application, and conflict resolution logic. It is not user-selectable,
but is instead always implicitly enabled.
This patch replaces a lot of if (NIGORI)' code branches and creates the
infrastructure we will need to support other data types that have these
properties. These types will be used to store metadata required for the
normal operation of the syncer.
Notable changes include:
- Introduce mutually exclusive lists of control types and user types in
model_type.cc.
- Create an ApplyControlDataUpdates() function, which will be used to
apply changes and resolve conflicts for control data types.
- Add some if statements to skip processing of control data updates in
the regular conflict resolution code path.
- Move around some code to accomodate the above changes. Introduce
apply_control_data_updates_unittest.cc and conflict_util.cc
- Have SyncBackendHost download all control types during init, not just
the NIGORI.
- Introduce a PurgeForMigration() function on the DataTypeManagerImpl
class to support migration of control data types. This replaces
ConfigureWithoutNigori(), which would not have scaled well as
additional control data types were addded.
- Modify the encryption logic so that only user types may be set to be
encrypted. The Nigori is no longer expected to be in the set of
encrypted types, though it is no less encrypted than it was before
this change.
- Use the list of user types to help calculate the list of registered
sync prefs.
BUG=122825, 111297
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=154522
Patch Set 1 #Patch Set 2 : Rebase #Patch Set 3 : Remove redundant test_entry files #Patch Set 4 : Minor fixes #Patch Set 5 : Refactor migration #Patch Set 6 : Fix unit tests #
Total comments: 13
Patch Set 7 : Address comments (never tried to compile, possibly broken) #
Total comments: 2
Patch Set 8 : Rebase #
Total comments: 10
Patch Set 9 : Respond to Nicolas' comments #Patch Set 10 : Rebase (compiled; not tested) #Patch Set 11 : Respond to Tim's comments #
Total comments: 1
Patch Set 12 : Big refactor #Patch Set 13 : Refactor encryption and sync prefs #Patch Set 14 : Add missing conflict_util files #Patch Set 15 : Compile fix and diff cleanup #Patch Set 16 : Small fixes #
Total comments: 12
Patch Set 17 : Update for review comments #Patch Set 18 : Add ToFullModelTypeSet() function #
Total comments: 2
Messages
Total messages: 26 (0 generated)
|