Chromium Code Reviews| Index: sync/protocol/proto_value_conversions.cc |
| diff --git a/sync/protocol/proto_value_conversions.cc b/sync/protocol/proto_value_conversions.cc |
| index f6b9322920c39df351264cc3d1bb41bac3f54d04..de45e624b812e8d925beb8e5862b63fd31888a79 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_notifications_specifics.pb.h" |
| #include "sync/protocol/theme_specifics.pb.h" |
| #include "sync/protocol/typed_url_specifics.pb.h" |
| @@ -219,6 +220,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(); |
| @@ -382,6 +386,17 @@ DictionaryValue* PreferenceSpecificsToValue( |
| return value; |
| } |
| + |
|
Nicolas Zea
2012/12/12 23:56:00
nit: remove extra newlines around this method.
|
| +DictionaryValue* SyncedNotificationsSpecificsToValue( |
| + const sync_pb::SyncedNotificationsSpecifics& proto) { |
| + DictionaryValue* value = new DictionaryValue(); |
| + // TODO(petewil): Adjust this once we add actual types in protobuf. |
| + SET_STR(name); |
| + SET_STR(value); |
| + return value; |
| +} |
| + |
| + |
| DictionaryValue* SearchEngineSpecificsToValue( |
| const sync_pb::SearchEngineSpecifics& proto) { |
| DictionaryValue* value = new DictionaryValue(); |
| @@ -455,6 +470,7 @@ DictionaryValue* EntitySpecificsToValue( |
| SET_FIELD(preference, PreferenceSpecificsToValue); |
| SET_FIELD(search_engine, SearchEngineSpecificsToValue); |
| SET_FIELD(session, SessionSpecificsToValue); |
| + SET_FIELD(synced_notifications, SyncedNotificationsSpecificsToValue); |
| SET_FIELD(theme, ThemeSpecificsToValue); |
| SET_FIELD(typed_url, TypedUrlSpecificsToValue); |
| return value; |