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

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: Fixed setting KERNEL_SHARE_INFO_DIRTY when incrementing transaction version 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
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);
}
}

Powered by Google App Engine
This is Rietveld 408576698