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

Side by Side Diff: chrome/browser/sync/engine/build_commit_command.cc

Issue 7246011: [Sync] Don't set old style bookmarks anymore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698