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

Issue 72403003: sync: Per-type update application (Closed)

Created:
7 years, 1 month ago by rlarocque
Modified:
7 years ago
Reviewers:
Nicolas Zea
CC:
chromium-reviews, tim+watch_chromium.org, rsimha+watch_chromium.org, haitaol+watch_chromium.org, pavely, tim (not reviewing)
Visibility:
Public.

Description

sync: Per-type update application This change moves the update application functionality from the ApplyUpdatesAndResolveConflictsCommand into the SyncDirectoryUpdateHandler class. This change will allow us to implement update application differently for different types. Because update application happens on the model threads, the ApplyUpdatesAndResolveConflictsCommand had to be aware of ModelSafeRoutingInfo, ModelSafeWorkers, and other concepts intended to hide threading details. The new code takes a different approach. It hides the threading details specific to each type inside its SyncDirectoryUpateHandler by initializing it with a scoped_refptr to its associated ModelSafeWorker. The ApplyUpdatesAndResolveConflictsCommand was the last SyncerCommand. With its removal, we can also remove the definitions of SyncerCommand, ModelChangingSyncerCommand and SyncerCommandTest. BUG=278484 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=238532

Patch Set 1 #

Total comments: 18

Patch Set 2 : Review fixes #

Total comments: 1

Patch Set 3 : Rebase + fix typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+833 lines, -1367 lines) Patch
D sync/engine/apply_updates_and_resolve_conflicts_command.h View 1 chunk +0 lines, -33 lines 0 comments Download
D sync/engine/apply_updates_and_resolve_conflicts_command.cc View 1 chunk +0 lines, -134 lines 0 comments Download
D sync/engine/apply_updates_and_resolve_conflicts_command_unittest.cc View 1 chunk +0 lines, -415 lines 0 comments Download
M sync/engine/download_unittest.cc View 1 2 3 chunks +9 lines, -7 lines 0 comments Download
M sync/engine/get_commit_ids.cc View 1 chunk +2 lines, -3 lines 0 comments Download
D sync/engine/model_changing_syncer_command.h View 1 chunk +0 lines, -76 lines 0 comments Download
D sync/engine/model_changing_syncer_command.cc View 1 chunk +0 lines, -51 lines 0 comments Download
D sync/engine/model_changing_syncer_command_unittest.cc View 1 chunk +0 lines, -88 lines 0 comments Download
M sync/engine/sync_directory_update_handler.h View 1 5 chunks +17 lines, -2 lines 0 comments Download
M sync/engine/sync_directory_update_handler.cc View 1 2 chunks +93 lines, -2 lines 0 comments Download
M sync/engine/sync_directory_update_handler_unittest.cc View 1 2 10 chunks +628 lines, -13 lines 0 comments Download
M sync/engine/sync_engine_event.h View 1 1 chunk +1 line, -1 line 0 comments Download
M sync/engine/sync_scheduler_impl.cc View 1 2 5 chunks +10 lines, -13 lines 0 comments Download
M sync/engine/syncer.h View 1 chunk +8 lines, -9 lines 0 comments Download
M sync/engine/syncer.cc View 2 chunks +5 lines, -3 lines 0 comments Download
D sync/engine/syncer_command.h View 1 chunk +0 lines, -47 lines 0 comments Download
D sync/engine/syncer_command.cc View 1 chunk +0 lines, -17 lines 0 comments Download
M sync/engine/syncer_unittest.cc View 1 2 4 chunks +4 lines, -5 lines 0 comments Download
M sync/engine/update_applicator.h View 2 chunks +1 line, -7 lines 0 comments Download
M sync/engine/update_applicator.cc View 3 chunks +1 line, -29 lines 0 comments Download
M sync/internal_api/public/util/syncer_error.h View 1 chunk +1 line, -9 lines 0 comments Download
M sync/internal_api/sync_manager_impl_unittest.cc View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M sync/sessions/status_controller.h View 1 2 3 chunks +7 lines, -49 lines 0 comments Download
M sync/sessions/status_controller.cc View 1 2 2 chunks +1 line, -9 lines 0 comments Download
M sync/sessions/status_controller_unittest.cc View 1 chunk +0 lines, -9 lines 0 comments Download
M sync/sessions/sync_session.h View 1 2 1 chunk +2 lines, -6 lines 0 comments Download
M sync/sessions/sync_session_context.h View 5 chunks +12 lines, -19 lines 0 comments Download
M sync/sessions/sync_session_context.cc View 2 chunks +20 lines, -14 lines 0 comments Download
M sync/sync_core.gypi View 3 chunks +0 lines, -6 lines 0 comments Download
M sync/sync_tests.gypi View 1 2 2 chunks +0 lines, -4 lines 0 comments Download
M sync/syncable/directory.h View 1 1 chunk +2 lines, -5 lines 0 comments Download
M sync/syncable/directory.cc View 1 chunk +2 lines, -10 lines 0 comments Download
D sync/test/engine/syncer_command_test.h View 1 2 1 chunk +0 lines, -189 lines 0 comments Download
D sync/test/engine/syncer_command_test.cc View 1 2 1 chunk +0 lines, -83 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
rlarocque
Nicolas: Please review. +CC Pavel, since this might bump into his SyncScheduler refactoring. +CC Tim, ...
7 years, 1 month ago (2013-11-15 23:44:38 UTC) #1
Nicolas Zea
https://codereview.chromium.org/72403003/diff/1/sync/engine/sync_directory_update_handler.cc File sync/engine/sync_directory_update_handler.cc (right): https://codereview.chromium.org/72403003/diff/1/sync/engine/sync_directory_update_handler.cc#newcode46 sync/engine/sync_directory_update_handler.cc:46: return; // We don't process control types here. What's ...
7 years, 1 month ago (2013-11-19 22:45:26 UTC) #2
rlarocque
Patch updated. PTAL. https://codereview.chromium.org/72403003/diff/1/sync/engine/sync_directory_update_handler.cc File sync/engine/sync_directory_update_handler.cc (right): https://codereview.chromium.org/72403003/diff/1/sync/engine/sync_directory_update_handler.cc#newcode46 sync/engine/sync_directory_update_handler.cc:46: return; // We don't process control ...
7 years, 1 month ago (2013-11-21 18:28:47 UTC) #3
Nicolas Zea
LGTM https://codereview.chromium.org/72403003/diff/370001/sync/engine/sync_directory_update_handler_unittest.cc File sync/engine/sync_directory_update_handler_unittest.cc (right): https://codereview.chromium.org/72403003/diff/370001/sync/engine/sync_directory_update_handler_unittest.cc#newcode34 sync/engine/sync_directory_update_handler_unittest.cc:34: // Update processing is what occurs when we ...
7 years ago (2013-12-02 21:09:32 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/72403003/400001
7 years ago (2013-12-02 23:30:56 UTC) #5
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=195676
7 years ago (2013-12-03 02:02:57 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/72403003/400001
7 years ago (2013-12-03 17:51:10 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/72403003/400001
7 years ago (2013-12-03 19:10:38 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/72403003/400001
7 years ago (2013-12-03 23:36:48 UTC) #9
commit-bot: I haz the power
7 years ago (2013-12-04 02:51:39 UTC) #10
Message was sent while issue was closed.
Change committed as 238532

Powered by Google App Engine
This is Rietveld 408576698