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

Unified Diff: sync/syncable/parent_child_index.cc

Issue 1136953013: Sync: Change Local IDs to GUID based to avoid ID collision (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed comments for Directory::NextId() Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/syncable/in_memory_directory_backing_store.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/parent_child_index.cc
diff --git a/sync/syncable/parent_child_index.cc b/sync/syncable/parent_child_index.cc
index a144e6c65503f80ab6e45f7d8a5373f305a55533..d9c0052cdf5e131c105fec813ab7c6a264ef7ec9 100644
--- a/sync/syncable/parent_child_index.cc
+++ b/sync/syncable/parent_child_index.cc
@@ -34,7 +34,8 @@ bool ChildComparator::operator()(const EntryKernel* a,
// Position doesn't matter.
DCHECK(!a->ref(UNIQUE_POSITION).IsValid());
DCHECK(!b->ref(UNIQUE_POSITION).IsValid());
- return a->ref(ID) < b->ref(ID);
+ // Sort by META_HANDLE to ensure consistent order for testing.
+ return a->ref(META_HANDLE) < b->ref(META_HANDLE);
}
}
« no previous file with comments | « sync/syncable/in_memory_directory_backing_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698