OLD | NEW |
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 Loading... |
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(), |
| 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 Loading... |
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 |
OLD | NEW |