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

Unified Diff: sync/internal_api/change_reorder_buffer.cc

Issue 11636006: WIP: The Bookmark Position Megapatch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Various updates, including switch suffix to unique_client_tag style Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/internal_api/base_node.cc ('k') | sync/internal_api/public/base/unique_position.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/change_reorder_buffer.cc
diff --git a/sync/internal_api/change_reorder_buffer.cc b/sync/internal_api/change_reorder_buffer.cc
index 51883092892c356d725f2f46212926cc23a16438..523fb8d38aec64ae1ff22e1aa71619894f0e8fd1 100644
--- a/sync/internal_api/change_reorder_buffer.cc
+++ b/sync/internal_api/change_reorder_buffer.cc
@@ -200,12 +200,7 @@ bool ChangeReorderBuffer::GetAllChangesInTreeOrder(
// There were ordering changes on the children of this parent, so
// enumerate all the children in the sibling order.
syncable::Entry parent(trans, syncable::GET_BY_HANDLE, next);
- syncable::Id id;
- if (!trans->directory()->GetFirstChildId(
- trans, parent.Get(syncable::ID), &id)) {
- *changes = ImmutableChangeRecordList();
- return false;
- }
+ syncable::Id id = parent.GetFirstChildId();
while (!id.IsRoot()) {
syncable::Entry child(trans, syncable::GET_BY_ID, id);
CHECK(child.good());
@@ -216,7 +211,7 @@ bool ChangeReorderBuffer::GetAllChangesInTreeOrder(
// ordering.
if (operations_.find(handle) == operations_.end())
operations_[handle] = OP_UPDATE_POSITION_AND_PROPERTIES;
- id = child.Get(syncable::NEXT_ID);
+ id = child.GetSuccessorId();
}
}
}
« no previous file with comments | « sync/internal_api/base_node.cc ('k') | sync/internal_api/public/base/unique_position.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698