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

Issue 25638003: sync: Implement per-type commit interface (Closed)

Created:
7 years, 2 months ago by rlarocque
Modified:
7 years, 2 months ago
CC:
chromium-reviews, tim+watch_chromium.org, rsimha+watch_chromium.org, haitaol+watch_chromium.org
Visibility:
Public.

Description

sync: Implement per-type commit interface Move most commit logic into per-type instances of SyncDirectoryCommitContributor and SyncDirectoryCommitContribution classes. Make GetCommitIdsCommand and ProcessCommitResponseCommand into container classes with only static methods. Remove OrderedCommitSet. The point of these changes is to make way for different kinds of entity committers. The SyncDirectoryCommitContributor and SyncDirectoryCommitContribution will eventually refactored into implementations of more generic "commit contributor" and "commit contribution" interfaces. This commit leaves us with some structures that might look a bit odd to someone unfamiliar with the history of this code. In particular, many of the old SyncerCommands look out of place. We plan to refactor them in future CLs. For now, it's more important to make sure this CL has an easy to read diff. BUG=278484 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=228810

Patch Set 1 #

Patch Set 2 : Fix compile warning #

Total comments: 16

Patch Set 3 : Rebase #

Patch Set 4 : Small fixes from first review #

Total comments: 52

Patch Set 5 : Some more review updates #

Patch Set 6 : Move BuildAndPostCommits #

Total comments: 14

Patch Set 7 : More review fixes #

Total comments: 4

Patch Set 8 : More review fixes #

Patch Set 9 : Rebase #

Patch Set 10 : Rebase (retry) #

Patch Set 11 : Attempt to fix win compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1136 lines, -1960 lines) Patch
D sync/engine/build_commit_command.h View 1 2 3 4 5 6 1 chunk +0 lines, -82 lines 0 comments Download
D sync/engine/build_commit_command.cc View 1 2 3 4 5 6 1 chunk +0 lines, -225 lines 0 comments Download
M sync/engine/commit.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +58 lines, -15 lines 0 comments Download
M sync/engine/commit.cc View 1 2 3 4 5 6 7 1 chunk +129 lines, -150 lines 0 comments Download
A sync/engine/commit_util.h View 1 2 3 4 5 6 1 chunk +64 lines, -0 lines 0 comments Download
A + sync/engine/commit_util.cc View 1 2 3 4 5 6 7 chunks +232 lines, -179 lines 0 comments Download
M sync/engine/get_commit_ids.h View 1 2 3 4 2 chunks +4 lines, -18 lines 0 comments Download
M sync/engine/get_commit_ids.cc View 1 chunk +0 lines, -21 lines 0 comments Download
D sync/engine/process_commit_response_command.h View 1 2 3 4 5 6 1 chunk +0 lines, -120 lines 0 comments Download
D sync/engine/process_commit_response_command.cc View 1 2 3 4 5 6 1 chunk +0 lines, -387 lines 0 comments Download
D sync/engine/process_commit_response_command_unittest.cc View 1 chunk +0 lines, -363 lines 0 comments Download
A sync/engine/sync_directory_commit_contribution.h View 1 2 3 4 5 6 7 1 chunk +102 lines, -0 lines 0 comments Download
A sync/engine/sync_directory_commit_contribution.cc View 1 2 3 4 5 6 1 chunk +164 lines, -0 lines 0 comments Download
A sync/engine/sync_directory_commit_contribution_unittest.cc View 1 2 3 4 5 6 1 chunk +235 lines, -0 lines 0 comments Download
A sync/engine/sync_directory_commit_contributor.h View 1 2 3 4 5 6 1 chunk +45 lines, -0 lines 0 comments Download
A sync/engine/sync_directory_commit_contributor.cc View 1 chunk +24 lines, -0 lines 0 comments Download
M sync/engine/syncer.h View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M sync/engine/syncer.cc View 1 2 3 4 5 6 7 3 chunks +33 lines, -3 lines 0 comments Download
M sync/engine/syncer_unittest.cc View 2 chunks +0 lines, -83 lines 0 comments Download
D sync/sessions/ordered_commit_set.h View 1 chunk +0 lines, -108 lines 0 comments Download
D sync/sessions/ordered_commit_set.cc View 1 chunk +0 lines, -93 lines 0 comments Download
D sync/sessions/ordered_commit_set_unittest.cc View 1 chunk +0 lines, -101 lines 0 comments Download
M sync/sessions/status_controller.h View 1 chunk +1 line, -1 line 0 comments Download
M sync/sessions/sync_session.h View 1 chunk +0 lines, -1 line 0 comments Download
M sync/sessions/sync_session_context.h View 3 chunks +14 lines, -2 lines 0 comments Download
M sync/sessions/sync_session_context.cc View 2 chunks +16 lines, -0 lines 0 comments Download
M sync/sync_core.gypi View 1 2 3 4 5 6 3 chunks +6 lines, -6 lines 0 comments Download
M sync/sync_tests.gypi View 1 2 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
rlarocque
Here's the first per-type sync refactor CL. This change is not as scary as it ...
7 years, 2 months ago (2013-10-02 21:02:51 UTC) #1
Nicolas Zea
At a high level, I find the notion of a SyncDirectoryCommitContrbution unclear. On the one ...
7 years, 2 months ago (2013-10-05 00:06:03 UTC) #2
rlarocque
https://codereview.chromium.org/25638003/diff/3001/sync/engine/sync_directory_commit_contribution.h File sync/engine/sync_directory_commit_contribution.h (right): https://codereview.chromium.org/25638003/diff/3001/sync/engine/sync_directory_commit_contribution.h#newcode11 sync/engine/sync_directory_commit_contribution.h:11: #include "base/stl_util.h" On 2013/10/05 00:06:03, Nicolas Zea wrote: > ...
7 years, 2 months ago (2013-10-07 23:00:05 UTC) #3
Nicolas Zea
https://codereview.chromium.org/25638003/diff/13001/sync/engine/build_commit_command.h File sync/engine/build_commit_command.h (right): https://codereview.chromium.org/25638003/diff/13001/sync/engine/build_commit_command.h#newcode31 sync/engine/build_commit_command.h:31: class SYNC_EXPORT_PRIVATE BuildCommitCommand : public SyncerCommand { Why not ...
7 years, 2 months ago (2013-10-09 00:17:39 UTC) #4
rlarocque
Upated the patch and addressed many comments. PTAL. https://codereview.chromium.org/25638003/diff/13001/sync/engine/build_commit_command.h File sync/engine/build_commit_command.h (right): https://codereview.chromium.org/25638003/diff/13001/sync/engine/build_commit_command.h#newcode31 sync/engine/build_commit_command.h:31: class ...
7 years, 2 months ago (2013-10-09 20:00:18 UTC) #5
tim (not reviewing)
Couple comments. https://codereview.chromium.org/25638003/diff/13001/sync/engine/commit.h File sync/engine/commit.h (right): https://codereview.chromium.org/25638003/diff/13001/sync/engine/commit.h#newcode47 sync/engine/commit.h:47: SyncerError BuildAndPostCommits( On 2013/10/09 20:00:19, rlarocque wrote: ...
7 years, 2 months ago (2013-10-10 17:22:36 UTC) #6
rlarocque
https://codereview.chromium.org/25638003/diff/13001/sync/engine/commit.h File sync/engine/commit.h (right): https://codereview.chromium.org/25638003/diff/13001/sync/engine/commit.h#newcode47 sync/engine/commit.h:47: SyncerError BuildAndPostCommits( On 2013/10/10 17:22:36, timsteele wrote: > On ...
7 years, 2 months ago (2013-10-10 19:05:00 UTC) #7
rlarocque
Patch updated. PTAL. I tried moving BuildAndPostCommits to see what it would look like. It ...
7 years, 2 months ago (2013-10-10 20:16:39 UTC) #8
Nicolas Zea
https://codereview.chromium.org/25638003/diff/13001/sync/engine/build_commit_command.h File sync/engine/build_commit_command.h (right): https://codereview.chromium.org/25638003/diff/13001/sync/engine/build_commit_command.h#newcode31 sync/engine/build_commit_command.h:31: class SYNC_EXPORT_PRIVATE BuildCommitCommand : public SyncerCommand { On 2013/10/09 ...
7 years, 2 months ago (2013-10-10 21:34:45 UTC) #9
rlarocque
Patch updated with changes in response to latest review. PTAL. https://codereview.chromium.org/25638003/diff/13001/sync/engine/build_commit_command.h File sync/engine/build_commit_command.h (right): https://codereview.chromium.org/25638003/diff/13001/sync/engine/build_commit_command.h#newcode31 ...
7 years, 2 months ago (2013-10-11 23:03:30 UTC) #10
Nicolas Zea
https://codereview.chromium.org/25638003/diff/30001/sync/engine/commit.h File sync/engine/commit.h (right): https://codereview.chromium.org/25638003/diff/30001/sync/engine/commit.h#newcode39 sync/engine/commit.h:39: static Commit* Init( On 2013/10/11 23:03:30, rlarocque wrote: > ...
7 years, 2 months ago (2013-10-14 21:45:34 UTC) #11
rlarocque
Patch updated. PTAL. https://codereview.chromium.org/25638003/diff/30001/sync/engine/commit.h File sync/engine/commit.h (right): https://codereview.chromium.org/25638003/diff/30001/sync/engine/commit.h#newcode39 sync/engine/commit.h:39: static Commit* Init( On 2013/10/14 21:45:35, ...
7 years, 2 months ago (2013-10-14 23:23:27 UTC) #12
Nicolas Zea
LGTM
7 years, 2 months ago (2013-10-14 23:29:24 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/25638003/64001
7 years, 2 months ago (2013-10-15 01:10:24 UTC) #14
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 2 months ago (2013-10-15 02:13:36 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/25638003/96001
7 years, 2 months ago (2013-10-15 19:57:27 UTC) #16
commit-bot: I haz the power
Retried try job too often on win7_aura for step(s) interactive_ui_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win7_aura&number=88852
7 years, 2 months ago (2013-10-15 21:54:52 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/25638003/96001
7 years, 2 months ago (2013-10-15 22:18:22 UTC) #18
commit-bot: I haz the power
7 years, 2 months ago (2013-10-16 00:03:52 UTC) #19
Message was sent while issue was closed.
Change committed as 228810

Powered by Google App Engine
This is Rietveld 408576698