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

Issue 10735041: Remove syncproto.h (Closed)

Created:
8 years, 5 months ago by rlarocque
Modified:
8 years, 5 months ago
Reviewers:
akalin
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Remove syncproto.h Replace sync/engine/syncproto.h with sync/syncable/syncable_proto_util.h and .cc. The tasks that used to be performed by member functions of the syncer:: proto wrapper classes are now handled by static member functions. Unfortunately, serialization and de-serialization of syncable::Id to/from proto fields has gotten a bit uglier. On the other hand, it's now much less magical and mysterious. The test intended to prevent regressions of crbug.com/134715 has been replaced with a DCHECK. We'll have to rely on it to ensure that the protocol_version field is always explicitly set. BUG=136454 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=146393

Patch Set 1 #

Patch Set 2 : Improve DCHECKing, fix tests #

Total comments: 30

Patch Set 3 : Remove casts + other misc fixes #

Patch Set 4 : Rebase #

Total comments: 17

Patch Set 5 : Address most comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -290 lines) Patch
M sync/engine/build_commit_command.h View 1 2 3 4 chunks +3 lines, -4 lines 0 comments Download
M sync/engine/build_commit_command.cc View 1 2 3 4 6 chunks +15 lines, -11 lines 0 comments Download
M sync/engine/build_commit_command_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M sync/engine/commit.cc View 1 2 2 chunks +3 lines, -6 lines 0 comments Download
M sync/engine/download_updates_command.cc View 1 2 3 chunks +5 lines, -5 lines 0 comments Download
M sync/engine/net/server_connection_manager.cc View 1 chunk +0 lines, -1 line 0 comments Download
M sync/engine/process_commit_response_command.h View 1 2 3 8 chunks +12 lines, -12 lines 0 comments Download
M sync/engine/process_commit_response_command.cc View 1 2 3 4 13 chunks +28 lines, -25 lines 0 comments Download
M sync/engine/process_commit_response_command_unittest.cc View 1 2 7 chunks +17 lines, -14 lines 0 comments Download
M sync/engine/process_updates_command.cc View 1 2 3 4 4 chunks +9 lines, -9 lines 0 comments Download
M sync/engine/store_timestamps_command.cc View 1 chunk +1 line, -1 line 0 comments Download
M sync/engine/syncer.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M sync/engine/syncer.cc View 2 chunks +1 line, -2 lines 0 comments Download
M sync/engine/syncer_proto_util.h View 1 2 3 6 chunks +11 lines, -8 lines 0 comments Download
M sync/engine/syncer_proto_util.cc View 1 2 3 4 9 chunks +25 lines, -14 lines 0 comments Download
M sync/engine/syncer_proto_util_unittest.cc View 1 2 5 chunks +8 lines, -4 lines 0 comments Download
M sync/engine/syncer_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M sync/engine/syncer_util.h View 1 2 3 5 chunks +9 lines, -7 lines 0 comments Download
M sync/engine/syncer_util.cc View 1 2 3 4 14 chunks +20 lines, -18 lines 0 comments Download
D sync/engine/syncproto.h View 1 2 3 1 chunk +0 lines, -86 lines 0 comments Download
D sync/engine/syncproto_unittest.cc View 1 chunk +0 lines, -18 lines 0 comments Download
M sync/engine/verify_updates_command.h View 1 2 3 2 chunks +1 line, -2 lines 0 comments Download
M sync/engine/verify_updates_command.cc View 1 2 8 chunks +16 lines, -14 lines 0 comments Download
M sync/engine/verify_updates_command_unittest.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M sync/sessions/session_state.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M sync/sessions/status_controller.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M sync/sessions/status_controller.cc View 1 chunk +2 lines, -1 line 0 comments Download
M sync/sessions/status_controller_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M sync/sync.gyp View 3 chunks +2 lines, -2 lines 0 comments Download
M sync/syncable/DEPS View 1 chunk +0 lines, -3 lines 0 comments Download
M sync/syncable/model_type.cc View 1 2 4 chunks +4 lines, -6 lines 0 comments Download
A sync/syncable/syncable_proto_util.h View 1 2 3 4 1 chunk +36 lines, -0 lines 0 comments Download
A sync/syncable/syncable_proto_util.cc View 1 2 3 4 1 chunk +32 lines, -0 lines 0 comments Download
M sync/syncable/syncable_unittest.cc View 3 chunks +7 lines, -7 lines 0 comments Download
M sync/test/engine/mock_connection_manager.cc View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
rlarocque
Please review.
8 years, 5 months ago (2012-07-11 00:27:22 UTC) #1
akalin
http://codereview.chromium.org/10735041/diff/1001/sync/engine/build_commit_command.cc File sync/engine/build_commit_command.cc (right): http://codereview.chromium.org/10735041/diff/1001/sync/engine/build_commit_command.cc#newcode103 sync/engine/build_commit_command.cc:103: DCHECK(meta_entry->GetModelType() == GetModelType(*sync_entry)); DCHECK_EQ? http://codereview.chromium.org/10735041/diff/1001/sync/engine/build_commit_command.cc#newcode129 sync/engine/build_commit_command.cc:129: static_cast<sync_pb::SyncEntity*>(commit_message->add_entries()); no need ...
8 years, 5 months ago (2012-07-11 01:42:22 UTC) #2
rlarocque
PTAL. I created a function, SyncerProtoUtil::SetProtocolVersion(), and used it to replace all instances of msg.set_protocol_version(msg.protocol_version()); ...
8 years, 5 months ago (2012-07-11 19:22:16 UTC) #3
akalin
LGTM! http://codereview.chromium.org/10735041/diff/1001/sync/engine/process_commit_response_command_unittest.cc File sync/engine/process_commit_response_command_unittest.cc (right): http://codereview.chromium.org/10735041/diff/1001/sync/engine/process_commit_response_command_unittest.cc#newcode25 sync/engine/process_commit_response_command_unittest.cc:25: using sync_pb::CommitResponse; On 2012/07/11 19:22:16, rlarocque wrote: > ...
8 years, 5 months ago (2012-07-11 23:10:40 UTC) #4
rlarocque
Addressed most comments. http://codereview.chromium.org/10735041/diff/1001/sync/engine/process_commit_response_command_unittest.cc File sync/engine/process_commit_response_command_unittest.cc (right): http://codereview.chromium.org/10735041/diff/1001/sync/engine/process_commit_response_command_unittest.cc#newcode25 sync/engine/process_commit_response_command_unittest.cc:25: using sync_pb::CommitResponse; On 2012/07/11 23:10:40, akalin ...
8 years, 5 months ago (2012-07-11 23:45:36 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/10735041/1011
8 years, 5 months ago (2012-07-12 17:14:47 UTC) #6
commit-bot: I haz the power
8 years, 5 months ago (2012-07-12 18:15:52 UTC) #7
Change committed as 146393

Powered by Google App Engine
This is Rietveld 408576698