| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/sync/engine/build_commit_command.h" | 5 #include "chrome/browser/sync/engine/build_commit_command.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 // Deletion is final on the server, let's move things and then delete them. | 170 // Deletion is final on the server, let's move things and then delete them. |
| 171 if (meta_entry.Get(IS_DEL)) { | 171 if (meta_entry.Get(IS_DEL)) { |
| 172 sync_entry->set_deleted(true); | 172 sync_entry->set_deleted(true); |
| 173 } else { | 173 } else { |
| 174 if (meta_entry.Get(SPECIFICS).HasExtension(sync_pb::bookmark)) { | 174 if (meta_entry.Get(SPECIFICS).HasExtension(sync_pb::bookmark)) { |
| 175 // Common data in both new and old protocol. | 175 // Common data in both new and old protocol. |
| 176 const Id& prev_id = meta_entry.Get(syncable::PREV_ID); | 176 const Id& prev_id = meta_entry.Get(syncable::PREV_ID); |
| 177 string prev_id_string = | 177 string prev_id_string = |
| 178 prev_id.IsRoot() ? string() : prev_id.GetServerId(); | 178 prev_id.IsRoot() ? string() : prev_id.GetServerId(); |
| 179 sync_entry->set_insert_after_item_id(prev_id_string); | 179 sync_entry->set_insert_after_item_id(prev_id_string); |
| 180 | |
| 181 // TODO(ncarter): In practice we won't want to send this data twice | |
| 182 // over the wire; instead, when deployed servers are able to accept | |
| 183 // the new-style scheme, we should abandon the old way. | |
| 184 SetOldStyleBookmarkData(&meta_entry, sync_entry); | |
| 185 } | 180 } |
| 186 SetEntrySpecifics(&meta_entry, sync_entry); | 181 SetEntrySpecifics(&meta_entry, sync_entry); |
| 187 } | 182 } |
| 188 } | 183 } |
| 189 session->status_controller()->mutable_commit_message()->CopyFrom(message); | 184 session->status_controller()->mutable_commit_message()->CopyFrom(message); |
| 190 } | 185 } |
| 191 | 186 |
| 192 } // namespace browser_sync | 187 } // namespace browser_sync |
| OLD | NEW |