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