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

Unified Diff: sync/protocol/proto_value_conversions.cc

Issue 11441005: Create a fresh sync datatype for Synced Notifications (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix merge conflict in prolto_value_conversions.h Created 7 years, 12 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') | sync/protocol/proto_value_conversions_unittest.cc » ('j') | 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 320ef27bda81f462a3142e6c3054344062f40ced..bc486e90d7591b303ca253e1ccfb5a814a74bc26 100644
--- a/sync/protocol/proto_value_conversions.cc
+++ b/sync/protocol/proto_value_conversions.cc
@@ -28,6 +28,7 @@
#include "sync/protocol/search_engine_specifics.pb.h"
#include "sync/protocol/session_specifics.pb.h"
#include "sync/protocol/sync.pb.h"
+#include "sync/protocol/synced_notification_specifics.pb.h"
#include "sync/protocol/theme_specifics.pb.h"
#include "sync/protocol/typed_url_specifics.pb.h"
@@ -220,6 +221,9 @@ base::DictionaryValue* TimeRangeDirectiveToValue(
return value;
}
+// TODO(petewil): I will need new functions here for the SyncedNotifications
+// subtypes.
+
DictionaryValue* AppNotificationToValue(
const sync_pb::AppNotification& proto) {
DictionaryValue* value = new DictionaryValue();
@@ -383,6 +387,13 @@ DictionaryValue* PreferenceSpecificsToValue(
return value;
}
+DictionaryValue* SyncedNotificationSpecificsToValue(
+ const sync_pb::SyncedNotificationSpecifics& proto) {
+ DictionaryValue* value = new DictionaryValue();
+ // TODO(petewil): Adjust this once we add actual types in protobuf.
+ return value;
+}
+
DictionaryValue* SearchEngineSpecificsToValue(
const sync_pb::SearchEngineSpecifics& proto) {
DictionaryValue* value = new DictionaryValue();
@@ -456,6 +467,7 @@ DictionaryValue* EntitySpecificsToValue(
SET_FIELD(preference, PreferenceSpecificsToValue);
SET_FIELD(search_engine, SearchEngineSpecificsToValue);
SET_FIELD(session, SessionSpecificsToValue);
+ SET_FIELD(synced_notification, SyncedNotificationSpecificsToValue);
SET_FIELD(theme, ThemeSpecificsToValue);
SET_FIELD(typed_url, TypedUrlSpecificsToValue);
return value;
« no previous file with comments | « sync/protocol/proto_value_conversions.h ('k') | sync/protocol/proto_value_conversions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698