summaryrefslogtreecommitdiffstats
path: root/sync/engine/commit.cc
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-12 18:15:45 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-12 18:15:45 +0000
commit447a5b6333539c309e015ee8f98ff6d9e131fa85 (patch)
tree4357764ce00fdfbff7809d348a16a5f601bd3b08 /sync/engine/commit.cc
parent13d5e1af907ece2266b391c322344fb0af43d9f0 (diff)
downloadchromium_src-447a5b6333539c309e015ee8f98ff6d9e131fa85.zip
chromium_src-447a5b6333539c309e015ee8f98ff6d9e131fa85.tar.gz
chromium_src-447a5b6333539c309e015ee8f98ff6d9e131fa85.tar.bz2
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= Review URL: https://chromiumcodereview.appspot.com/10735041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146393 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/engine/commit.cc')
-rw-r--r--sync/engine/commit.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/sync/engine/commit.cc b/sync/engine/commit.cc
index 02bee1e..731643a 100644
--- a/sync/engine/commit.cc
+++ b/sync/engine/commit.cc
@@ -63,15 +63,12 @@ void ClearSyncingBits(syncable::Directory* dir,
// return value of this function is true.
bool PrepareCommitMessage(sessions::SyncSession* session,
sessions::OrderedCommitSet* commit_set,
- ClientToServerMessage* commit_message) {
+ sync_pb::ClientToServerMessage* commit_message) {
TRACE_EVENT0("sync", "PrepareCommitMessage");
commit_set->Clear();
commit_message->Clear();
- // TODO(134769): This is a temporary fix for crbug.com/134715.
- commit_message->set_protocol_version(commit_message->protocol_version());
-
WriteTransaction trans(FROM_HERE, SYNCER, session->context()->directory());
sessions::ScopedSetSessionWriteTransaction set_trans(session, &trans);
@@ -96,10 +93,10 @@ bool PrepareCommitMessage(sessions::SyncSession* session,
SyncerError BuildAndPostCommitsImpl(Syncer* syncer,
sessions::SyncSession* session,
sessions::OrderedCommitSet* commit_set) {
- ClientToServerMessage commit_message;
+ sync_pb::ClientToServerMessage commit_message;
while (!syncer->ExitRequested() &&
PrepareCommitMessage(session, commit_set, &commit_message)) {
- ClientToServerResponse commit_response;
+ sync_pb::ClientToServerResponse commit_response;
DVLOG(1) << "Sending commit message.";
TRACE_EVENT_BEGIN0("sync", "PostCommit");