summaryrefslogtreecommitdiffstats
path: root/sync
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-27 01:11:30 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-27 01:11:30 +0000
commit8ff35ce749a68cf775a4c46fbd9009f3014f39c1 (patch)
tree0656cf1ac7e6df9ffb298449733a2f7aac9274a3 /sync
parent24358a960a9cd1630e7d8ae1d77c028cf1127ae7 (diff)
downloadchromium_src-8ff35ce749a68cf775a4c46fbd9009f3014f39c1.zip
chromium_src-8ff35ce749a68cf775a4c46fbd9009f3014f39c1.tar.gz
chromium_src-8ff35ce749a68cf775a4c46fbd9009f3014f39c1.tar.bz2
Merge 144339 - sync: Set explicit protocol_version on commit
The use of Message::Clear() function in commit.cc was unsetting this field. This change explicitly sets the field to the current default value following the Clear(). It also adds a test assertion to verify that the field is properly set. BUG=134769,134715 TEST=Run against the test server and verify the field is in the logs. Review URL: https://chromiumcodereview.appspot.com/10679010 TBR=rlarocque@chromium.org Review URL: https://chromiumcodereview.appspot.com/10681009 git-svn-id: svn://svn.chromium.org/chrome/branches/1180/src@144348 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync')
-rw-r--r--sync/engine/commit.cc3
-rw-r--r--sync/test/engine/mock_connection_manager.cc1
2 files changed, 4 insertions, 0 deletions
diff --git a/sync/engine/commit.cc b/sync/engine/commit.cc
index 2f39c23..84ab716 100644
--- a/sync/engine/commit.cc
+++ b/sync/engine/commit.cc
@@ -68,6 +68,9 @@ bool PrepareCommitMessage(sessions::SyncSession* session,
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);
diff --git a/sync/test/engine/mock_connection_manager.cc b/sync/test/engine/mock_connection_manager.cc
index f3c8ccd..419620f 100644
--- a/sync/test/engine/mock_connection_manager.cc
+++ b/sync/test/engine/mock_connection_manager.cc
@@ -87,6 +87,7 @@ bool MockConnectionManager::PostBufferToPath(PostBufferParams* params,
browser_sync::ScopedServerStatusWatcher* watcher) {
ClientToServerMessage post;
CHECK(post.ParseFromString(params->buffer_in));
+ CHECK(post.has_protocol_version());
last_request_.CopyFrom(post);
client_stuck_ = post.sync_problem_detected();
ClientToServerResponse response;