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..eeefd59581a52588fd0cc8760b0a46ae0f62ba99 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(std::numeric_limits<std::string::value_type>::min()); |
+ return id; |
+} |
+ |
+// static |
+Id Id::GetLeastIdForLexicographicComparison() { |
+ Id id; |
+ id.s_.clear(); |
+ return id; |
+} |
+ |
} // namespace syncable |