summaryrefslogtreecommitdiffstats
path: root/sync
diff options
context:
space:
mode:
authorpetewil@chromium.org <petewil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-29 23:21:27 +0000
committerpetewil@chromium.org <petewil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-29 23:21:27 +0000
commit18f137bcd485b0fc27fc3584d059a270689633fc (patch)
tree236ce2fb6658b0b42b253195da0eedd21801c22a /sync
parent3812aac956b4ac5ea4939cd530812fbfaa3143bc (diff)
downloadchromium_src-18f137bcd485b0fc27fc3584d059a270689633fc.zip
chromium_src-18f137bcd485b0fc27fc3584d059a270689633fc.tar.gz
chromium_src-18f137bcd485b0fc27fc3584d059a270689633fc.tar.bz2
Enhance Sync Node Browser Logging
When we added the logging before, due to time constraints we didn't log everything that we were using. Now that we have a bit more time, I've added more logging to help as we enter the bug fix phase for Synced Notifications. This logging should help with specific outstanding bugs as well as being generally useful moving forwards. BUG=281510 Review URL: https://chromiumcodereview.appspot.com/23526005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220424 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync')
-rw-r--r--sync/protocol/proto_value_conversions.cc28
-rw-r--r--sync/protocol/proto_value_conversions.h13
2 files changed, 41 insertions, 0 deletions
diff --git a/sync/protocol/proto_value_conversions.cc b/sync/protocol/proto_value_conversions.cc
index c56ef0f..a42b902 100644
--- a/sync/protocol/proto_value_conversions.cc
+++ b/sync/protocol/proto_value_conversions.cc
@@ -241,11 +241,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;
}
@@ -259,6 +284,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;
}
@@ -268,6 +294,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;
}
diff --git a/sync/protocol/proto_value_conversions.h b/sync/protocol/proto_value_conversions.h
index 39b8e0e..f5306d7 100644
--- a/sync/protocol/proto_value_conversions.h
+++ b/sync/protocol/proto_value_conversions.h
@@ -43,6 +43,7 @@ class FaviconTrackingSpecifics;
class GlobalIdDirective;
class HistoryDeleteDirectiveSpecifics;
class KeystoreEncryptionFlagsSpecifics;
+class Media;
class ManagedUserSettingSpecifics;
class ManagedUserSpecifics;
class NigoriSpecifics;
@@ -57,6 +58,8 @@ class SessionTab;
class SessionWindow;
class SimpleCollapsedLayout;
class SyncCycleCompletedEventInfo;
+class SyncedNotificationImage;
+class SyncedNotificationProfileImage;
class SyncedNotificationRenderInfo;
class SyncedNotificationSpecifics;
class TabNavigation;
@@ -192,6 +195,9 @@ SYNC_EXPORT_PRIVATE base::DictionaryValue* ManagedUserSettingSpecificsToValue(
SYNC_EXPORT_PRIVATE base::DictionaryValue* ManagedUserSpecificsToValue(
const sync_pb::ManagedUserSpecifics& managed_user_specifics);
+SYNC_EXPORT_PRIVATE base::DictionaryValue* MediaToValue(
+ const sync_pb::Media& media);
+
SYNC_EXPORT_PRIVATE base::DictionaryValue* NigoriSpecificsToValue(
const sync_pb::NigoriSpecifics& nigori_specifics);
@@ -211,6 +217,13 @@ SYNC_EXPORT_PRIVATE base::DictionaryValue* SearchEngineSpecificsToValue(
SYNC_EXPORT_PRIVATE base::DictionaryValue* SessionSpecificsToValue(
const sync_pb::SessionSpecifics& session_specifics);
+SYNC_EXPORT_PRIVATE base::DictionaryValue* SyncedNotificationImageToValue(
+ const sync_pb::SyncedNotificationImage& image);
+
+SYNC_EXPORT_PRIVATE base::DictionaryValue*
+ SyncedNotificationProfileImageToValue(
+ const sync_pb::SyncedNotificationProfileImage& image);
+
SYNC_EXPORT_PRIVATE base::DictionaryValue* ThemeSpecificsToValue(
const sync_pb::ThemeSpecifics& theme_specifics);