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

Unified Diff: sync/syncable/entry_kernel.cc

Issue 211523002: Add AttachmentMetadata to Sync's EntryKernel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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/entry_kernel.cc
diff --git a/sync/syncable/entry_kernel.cc b/sync/syncable/entry_kernel.cc
index 97344838fbd60fd2620596967c758ec82db34f01..0821999b8cdffa25a32576b99ec2175cdacd755a 100644
--- a/sync/syncable/entry_kernel.cc
+++ b/sync/syncable/entry_kernel.cc
@@ -129,6 +129,11 @@ base::StringValue* UniquePositionToValue(const UniquePosition& pos) {
return new base::StringValue(pos.ToDebugString());
}
+base::StringValue* AttachmentMetadataToValue(
+ const sync_pb::AttachmentMetadata& a) {
+ return new base::StringValue(a.SerializeAsString());
+}
+
} // namespace
base::DictionaryValue* EntryKernel::ToValue(
@@ -186,6 +191,14 @@ base::DictionaryValue* EntryKernel::ToValue(
&GetUniquePositionFieldString, &UniquePositionToValue,
UNIQUE_POSITION_FIELDS_BEGIN, UNIQUE_POSITION_FIELDS_END - 1);
+ // AttachmentMetadata fields
+ SetFieldValues(*this,
+ kernel_info,
+ &GetAttachmentMetadataFieldString,
+ &AttachmentMetadataToValue,
+ ATTACHMENT_METADATA_FIELDS_BEGIN,
+ ATTACHMENT_METADATA_FIELDS_END - 1);
+
// Bit temps.
SetFieldValues(*this, kernel_info,
&GetBitTempString, &BooleanToValue,

Powered by Google App Engine
This is Rietveld 408576698