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

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: Forgot about using META_PROTO_TIMES_VALS in the test. 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
« no previous file with comments | « sync/syncable/entry_kernel.h ('k') | sync/syncable/syncable_columns.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 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,
« no previous file with comments | « sync/syncable/entry_kernel.h ('k') | sync/syncable/syncable_columns.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698