summaryrefslogtreecommitdiffstats
path: root/sync/engine/commit.cc
diff options
context:
space:
mode:
authorrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-27 00:40:01 +0000
committerrlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-27 00:40:01 +0000
commit0160addb4cba6147c0fdd8d375786106f6a35e8f (patch)
treeac8f5052e68fe86c48f8d1a7511f972b4a6e80e0 /sync/engine/commit.cc
parent931be3771b86fff64f4c4be9c9430c2db6e76c74 (diff)
downloadchromium_src-0160addb4cba6147c0fdd8d375786106f6a35e8f.zip
chromium_src-0160addb4cba6147c0fdd8d375786106f6a35e8f.tar.gz
chromium_src-0160addb4cba6147c0fdd8d375786106f6a35e8f.tar.bz2
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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144339 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/engine/commit.cc')
-rw-r--r--sync/engine/commit.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sync/engine/commit.cc b/sync/engine/commit.cc
index f9a56e9..4da658d 100644
--- a/sync/engine/commit.cc
+++ b/sync/engine/commit.cc
@@ -70,6 +70,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);