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 |