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

Unified Diff: sync/protocol/proto_value_conversions.cc

Issue 23526005: Enhance Sync Node Browser Logging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: First patch set bad, try a second one. Created 7 years, 4 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/protocol/proto_value_conversions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/protocol/proto_value_conversions.cc
diff --git a/sync/protocol/proto_value_conversions.cc b/sync/protocol/proto_value_conversions.cc
index f4fe44d10b2fb9897fee9666fa115d32c93c5e6b..e2e0846d959bc90c5424cfd18e93d9f5d6dee9e3 100644
--- a/sync/protocol/proto_value_conversions.cc
+++ b/sync/protocol/proto_value_conversions.cc
@@ -240,11 +240,36 @@ base::DictionaryValue* TimeRangeDirectiveToValue(
return value;
}
+base::DictionaryValue* SyncedNotificationImageToValue(
+ const sync_pb::SyncedNotificationImage& proto) {
+ base::DictionaryValue* value = new base::DictionaryValue();
+ SET_STR(url);
+ return value;
+}
+
+base::DictionaryValue* SyncedNotificationProfileImageToValue(
+ const sync_pb::SyncedNotificationProfileImage& proto) {
+ base::DictionaryValue* value = new base::DictionaryValue();
+ SET_STR(image_url);
+ return value;
+}
+
+base::DictionaryValue* MediaToValue(
+ const sync_pb::Media& proto) {
+ base::DictionaryValue* value = new base::DictionaryValue();
+ SET(image, SyncedNotificationImageToValue);
+ return value;
+}
+
base::DictionaryValue* SimpleCollapsedLayoutToValue(
const sync_pb::SimpleCollapsedLayout& proto) {
base::DictionaryValue* value = new base::DictionaryValue();
SET_STR(heading);
SET_STR(description);
+ SET_STR(annotation);
+ SET_REP(media, MediaToValue);
+ SET_REP(profile_image, SyncedNotificationProfileImageToValue);
+ SET(app_icon, SyncedNotificationImageToValue);
return value;
}
@@ -258,6 +283,7 @@ base::DictionaryValue* CollapsedInfoToValue(
base::DictionaryValue* RenderInfoToValue(
const sync_pb::SyncedNotificationRenderInfo& proto) {
base::DictionaryValue* value = new base::DictionaryValue();
+ // TODO(petewil): Add the expanded info values too.
SET(collapsed_info, CollapsedInfoToValue);
return value;
}
@@ -267,6 +293,8 @@ base::DictionaryValue* CoalescedNotificationToValue(
base::DictionaryValue* value = new base::DictionaryValue();
SET_STR(key);
SET_INT32(read_state);
+ SET_INT64(creation_time_msec);
+ SET_INT32(priority);
SET(render_info, RenderInfoToValue);
return value;
}
« no previous file with comments | « sync/protocol/proto_value_conversions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698