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

Unified Diff: sync/syncable/entry_kernel.cc

Issue 10989063: Changed DB to store node positions as Ordinals. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed memory leak error in unittest Created 8 years, 2 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/entry_kernel.h ('k') | sync/syncable/mutable_entry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/syncable/entry_kernel.cc
diff --git a/sync/syncable/entry_kernel.cc b/sync/syncable/entry_kernel.cc
index 550fbb2bbd6163923ec0b033c6cefdd1d7ddc056..ab3de95090b2cbfe49b42ed2ad387fc0f8ce966a 100644
--- a/sync/syncable/entry_kernel.cc
+++ b/sync/syncable/entry_kernel.cc
@@ -69,6 +69,10 @@ StringValue* IdToValue(const Id& id) {
return id.ToValue();
}
+StringValue* OrdinalToValue(const NodeOrdinal& ord) {
+ return Value::CreateStringValue(ord.ToDebugString());
+}
+
} // namespace
DictionaryValue* EntryKernel::ToValue() const {
@@ -123,6 +127,11 @@ DictionaryValue* EntryKernel::ToValue() const {
&GetProtoFieldString, &EntitySpecificsToValue,
PROTO_FIELDS_BEGIN, PROTO_FIELDS_END - 1);
+ // Ordinal fields
+ SetFieldValues(*this, kernel_info,
+ &GetOrdinalFieldString, &OrdinalToValue,
+ ORDINAL_FIELDS_BEGIN, ORDINAL_FIELDS_END - 1);
+
// Bit temps.
SetFieldValues(*this, kernel_info,
&GetBitTempString, &Value::CreateBooleanValue,
« no previous file with comments | « sync/syncable/entry_kernel.h ('k') | sync/syncable/mutable_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698