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

Side by Side Diff: sync/engine/commit_util.cc

Issue 298503002: sync: Enable typed tombstones commits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sync/engine/commit_util.h" 5 #include "sync/engine/commit_util.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 sync_entry->mutable_unique_position()); 175 sync_entry->mutable_unique_position());
176 } 176 }
177 // Always send specifics for bookmarks. 177 // Always send specifics for bookmarks.
178 SetEntrySpecifics(meta_entry, sync_entry); 178 SetEntrySpecifics(meta_entry, sync_entry);
179 return; 179 return;
180 } 180 }
181 181
182 // Deletion is final on the server, let's move things and then delete them. 182 // Deletion is final on the server, let's move things and then delete them.
183 if (meta_entry.GetIsDel()) { 183 if (meta_entry.GetIsDel()) {
184 sync_entry->set_deleted(true); 184 sync_entry->set_deleted(true);
185
186 sync_pb::EntitySpecifics type_only_specifics;
187 AddDefaultFieldValue(meta_entry.GetModelType(),
haitaol1 2014/05/19 21:59:12 Will it cause parse failure on server if required
albertb 2014/05/19 22:02:57 It would, but as far as I can tell, there are no r
rlarocque 2014/05/19 22:14:57 That's a good point. It probably would cause a pa
haitaol1 2014/05/19 22:39:05 Can you add a test that calls AddDefaultFieldValue
rlarocque 2014/05/19 23:51:28 Done.
188 sync_entry->mutable_specifics());
185 } else { 189 } else {
186 SetEntrySpecifics(meta_entry, sync_entry); 190 SetEntrySpecifics(meta_entry, sync_entry);
187 } 191 }
188 } 192 }
189 193
190 // Helpers for ProcessSingleCommitResponse. 194 // Helpers for ProcessSingleCommitResponse.
191 namespace { 195 namespace {
192 196
193 void LogServerError(const sync_pb::CommitResponse_EntryResponse& res) { 197 void LogServerError(const sync_pb::CommitResponse_EntryResponse& res) {
194 if (res.has_error_message()) 198 if (res.has_error_message())
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 } 443 }
440 444
441 ProcessSuccessfulCommitResponse(commit_request_entry, server_entry, 445 ProcessSuccessfulCommitResponse(commit_request_entry, server_entry,
442 local_entry.GetId(), &local_entry, syncing_was_set, deleted_folders); 446 local_entry.GetId(), &local_entry, syncing_was_set, deleted_folders);
443 return response; 447 return response;
444 } 448 }
445 449
446 } // namespace commit_util 450 } // namespace commit_util
447 451
448 } // namespace syncer 452 } // namespace syncer
OLDNEW
« no previous file with comments | « no previous file | sync/engine/directory_commit_contribution_unittest.cc » ('j') | sync/protocol/sync.proto » ('J')

Powered by Google App Engine
This is Rietveld 408576698