Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Issue 10559104: sync: Process 'control' data separately (Closed)

Created:
8 years, 6 months ago by rlarocque
Modified:
8 years, 4 months ago
CC:
chromium-reviews, Raghu Simha, ncarter (slow), akalin, tim (not reviewing)
Visibility:
Public.

Description

sync: Process 'control' data separately The Nigori node's update application and conflict resolution code is unique. This change pulls the code for working with Nigori nodes out of the regular ModelChangingSyncerCommands and into a separate function named ApplyControlDataUpdates. As part of this change, certain ApplyUpdatesCommandTest test cases have been renamed and moved to ApplyControlDataUpdatesTest. We will soon be introducing new data types that are special in their own way. This CL was written with this in mind. It adds a new ModelSafeGroup whose types are excluded from regular update application and conflict resolution steps. Membership in this group is controlled through the 'IsControlType()' function in model_type.h. BUG=122825, 111297

Patch Set 1 #

Patch Set 2 : Update patch. Still draft quality. #

Total comments: 9

Patch Set 3 : Rename, cleanup, fix tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+972 lines, -720 lines) Patch
M chrome/browser/sync/glue/sync_backend_registrar.cc View 1 2 4 chunks +13 lines, -2 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_registrar_unittest.cc View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
A sync/engine/apply_control_data_updates.h View 1 2 1 chunk +24 lines, -0 lines 0 comments Download
A sync/engine/apply_control_data_updates.cc View 1 2 1 chunk +135 lines, -0 lines 0 comments Download
A sync/engine/apply_control_data_updates_unittest.cc View 1 2 1 chunk +333 lines, -0 lines 0 comments Download
M sync/engine/apply_updates_command.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M sync/engine/apply_updates_command_unittest.cc View 1 2 20 chunks +70 lines, -565 lines 0 comments Download
M sync/engine/conflict_resolver.h View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M sync/engine/conflict_resolver.cc View 1 2 6 chunks +7 lines, -84 lines 0 comments Download
M sync/engine/model_changing_syncer_command_unittest.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M sync/engine/resolve_conflicts_command.cc View 1 2 1 chunk +7 lines, -1 line 0 comments Download
M sync/engine/sync_scheduler.cc View 1 2 3 chunks +11 lines, -0 lines 0 comments Download
M sync/engine/sync_scheduler_unittest.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M sync/engine/sync_scheduler_whitebox_unittest.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M sync/engine/syncer.cc View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M sync/engine/syncer_unittest.cc View 1 2 4 chunks +11 lines, -4 lines 0 comments Download
M sync/engine/syncer_util.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M sync/engine/syncer_util.cc View 1 2 2 chunks +33 lines, -45 lines 0 comments Download
M sync/internal_api/public/engine/model_safe_worker.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M sync/internal_api/public/syncable/model_type.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M sync/internal_api/sync_manager.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M sync/sessions/sync_session.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M sync/sessions/sync_session_unittest.cc View 1 2 11 chunks +24 lines, -2 lines 0 comments Download
M sync/sync.gyp View 1 2 3 chunks +9 lines, -4 lines 0 comments Download
M sync/syncable/model_type.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M sync/test/engine/syncer_command_test.h View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
M sync/test/engine/syncer_command_test.cc View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
A sync/test/test_entry_factory.h View 1 2 1 chunk +72 lines, -0 lines 0 comments Download
A sync/test/test_entry_factory.cc View 1 2 1 chunk +169 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
rlarocque
I'm still fighting with unit tests, and there are a few style violations and FIXMEs ...
8 years, 6 months ago (2012-06-21 02:06:59 UTC) #1
Nicolas Zea
http://codereview.chromium.org/10559104/diff/4002/sync/engine/apply_metadata_updates.cc File sync/engine/apply_metadata_updates.cc (right): http://codereview.chromium.org/10559104/diff/4002/sync/engine/apply_metadata_updates.cc#newcode53 sync/engine/apply_metadata_updates.cc:53: if (nigori_node.Get(IS_UNAPPLIED_UPDATE)) { if (!nigori_node.Get(IS_UNAPPLIED_UPDATE)) return; http://codereview.chromium.org/10559104/diff/4002/sync/engine/syncer.cc File sync/engine/syncer.cc ...
8 years, 6 months ago (2012-06-21 02:58:36 UTC) #2
rlarocque
http://codereview.chromium.org/10559104/diff/4002/sync/engine/syncer.cc File sync/engine/syncer.cc (right): http://codereview.chromium.org/10559104/diff/4002/sync/engine/syncer.cc#newcode172 sync/engine/syncer.cc:172: ApplyMetadataUpdates(session->context()->directory()); On 2012/06/21 02:58:36, nzea wrote: > We can ...
8 years, 6 months ago (2012-06-21 18:23:27 UTC) #3
rlarocque
At lunch, Tim asked why I didn't simply remove the NIGORI type from the routing ...
8 years, 6 months ago (2012-06-21 20:15:27 UTC) #4
tim (not reviewing)
http://codereview.chromium.org/10559104/diff/4002/sync/engine/apply_updates_command.cc File sync/engine/apply_updates_command.cc (right): http://codereview.chromium.org/10559104/diff/4002/sync/engine/apply_updates_command.cc#newcode41 sync/engine/apply_updates_command.cc:41: groups_with_unapplied_updates.erase(GROUP_INTERNAL); Hmm. If we apply these types separately and ...
8 years, 6 months ago (2012-06-22 16:34:15 UTC) #5
rlarocque
http://codereview.chromium.org/10559104/diff/4002/sync/engine/apply_updates_command.cc File sync/engine/apply_updates_command.cc (right): http://codereview.chromium.org/10559104/diff/4002/sync/engine/apply_updates_command.cc#newcode41 sync/engine/apply_updates_command.cc:41: groups_with_unapplied_updates.erase(GROUP_INTERNAL); On 2012/06/22 16:34:15, timsteele wrote: > Hmm. If ...
8 years, 6 months ago (2012-06-22 16:42:31 UTC) #6
rlarocque
http://codereview.chromium.org/10559104/diff/4002/sync/engine/apply_updates_command.cc File sync/engine/apply_updates_command.cc (right): http://codereview.chromium.org/10559104/diff/4002/sync/engine/apply_updates_command.cc#newcode41 sync/engine/apply_updates_command.cc:41: groups_with_unapplied_updates.erase(GROUP_INTERNAL); On 2012/06/22 16:42:31, rlarocque wrote: > On 2012/06/22 ...
8 years, 6 months ago (2012-06-22 18:40:34 UTC) #7
rlarocque
Updated patch. This one seems to actually work. I've decided not to try to commit ...
8 years, 6 months ago (2012-06-22 23:24:16 UTC) #8
rlarocque
8 years, 4 months ago (2012-08-07 19:32:21 UTC) #9
This review has been obsoleted by the rebased and improved
http://codereview.chromium.org/10825137/.

Powered by Google App Engine
This is Rietveld 408576698