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

Side by Side Diff: sync/internal_api/change_reorder_buffer.cc

Issue 11637053: sync: Start moving away from PREV_ID and NEXT_ID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 11 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 | « sync/internal_api/base_node.cc ('k') | sync/internal_api/write_node.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/internal_api/change_reorder_buffer.h" 5 #include "sync/internal_api/change_reorder_buffer.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <queue> 8 #include <queue>
9 #include <set> 9 #include <set>
10 #include <utility> // for pair<> 10 #include <utility> // for pair<>
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 while (!id.IsRoot()) { 209 while (!id.IsRoot()) {
210 syncable::Entry child(trans, syncable::GET_BY_ID, id); 210 syncable::Entry child(trans, syncable::GET_BY_ID, id);
211 CHECK(child.good()); 211 CHECK(child.good());
212 int64 handle = child.Get(syncable::META_HANDLE); 212 int64 handle = child.Get(syncable::META_HANDLE);
213 to_visit.push(handle); 213 to_visit.push(handle);
214 // If there is no operation on this child node, record it as as an 214 // If there is no operation on this child node, record it as as an
215 // update, so that the listener gets notified of all nodes in the new 215 // update, so that the listener gets notified of all nodes in the new
216 // ordering. 216 // ordering.
217 if (operations_.find(handle) == operations_.end()) 217 if (operations_.find(handle) == operations_.end())
218 operations_[handle] = OP_UPDATE_POSITION_AND_PROPERTIES; 218 operations_[handle] = OP_UPDATE_POSITION_AND_PROPERTIES;
219 id = child.Get(syncable::NEXT_ID); 219 id = child.GetSuccessorId();
220 } 220 }
221 } 221 }
222 } 222 }
223 223
224 *changes = ImmutableChangeRecordList(&changelist); 224 *changes = ImmutableChangeRecordList(&changelist);
225 return true; 225 return true;
226 } 226 }
227 227
228 } // namespace syncer 228 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/base_node.cc ('k') | sync/internal_api/write_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698