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

Unified Diff: chrome/browser/sync/syncable/syncable_id.cc

Issue 6588119: First-time sync: asymptotic running time improvement (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/Release
Patch Set: Fix test bug. Created 9 years, 10 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 | « chrome/browser/sync/syncable/syncable_id.h ('k') | chrome/browser/sync/syncable/syncable_id_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/syncable/syncable_id.cc
diff --git a/chrome/browser/sync/syncable/syncable_id.cc b/chrome/browser/sync/syncable/syncable_id.cc
index 766289b176637a56365bad2536de27b844ea0870..ea8aebd8e860449411536a0a2a54a2bda28a96c9 100644
--- a/chrome/browser/sync/syncable/syncable_id.cc
+++ b/chrome/browser/sync/syncable/syncable_id.cc
@@ -45,4 +45,19 @@ Id Id::CreateFromClientString(const string& local_id) {
return id;
}
+Id Id::GetLexicographicSuccessor() const {
+ // The successor of a string is given by appending the least
+ // character in the alphabet.
+ Id id = *this;
+ id.s_.push_back(0);
+ return id;
+}
+
+// static
+Id Id::GetLeastIdForLexicographicComparison() {
+ Id id;
+ id.s_.clear();
+ return id;
+}
+
} // namespace syncable
« no previous file with comments | « chrome/browser/sync/syncable/syncable_id.h ('k') | chrome/browser/sync/syncable/syncable_id_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698