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..b7b89b0d84a978bc5d9bab513cd56962bf4b82a3 100644 |
| --- a/sync/protocol/proto_value_conversions.cc |
| +++ b/sync/protocol/proto_value_conversions.cc |
| @@ -25,6 +25,7 @@ |
| #include "sync/protocol/password_specifics.pb.h" |
| #include "sync/protocol/preference_specifics.pb.h" |
| #include "sync/protocol/proto_enum_conversions.h" |
| +#include "sync/protocol/push_notifications_specifics.pb.h" |
| #include "sync/protocol/search_engine_specifics.pb.h" |
| #include "sync/protocol/session_specifics.pb.h" |
| #include "sync/protocol/sync.pb.h" |
| @@ -219,6 +220,8 @@ base::DictionaryValue* TimeRangeDirectiveToValue( |
| return value; |
| } |
| +// TODO: I will need new functions here for the PushNotifications subtypes |
|
akalin
2012/12/06 23:34:55
put your name as part of the TODO. also, append p
Pete Williamson
2012/12/11 18:05:26
Done.
|
| + |
| DictionaryValue* AppNotificationToValue( |
| const sync_pb::AppNotification& proto) { |
| DictionaryValue* value = new DictionaryValue(); |
| @@ -382,6 +385,17 @@ DictionaryValue* PreferenceSpecificsToValue( |
| return value; |
| } |
| + |
| +DictionaryValue* PushNotificationsSpecificsToValue( |
| + const sync_pb::PushNotificationsSpecifics& proto) { |
| + DictionaryValue* value = new DictionaryValue(); |
| + // TODO: Adjust this for the actual types in PN protobuf |
|
akalin
2012/12/06 23:34:55
here too
Pete Williamson
2012/12/11 18:05:26
Done.
|
| + SET_STR(name); |
| + SET_STR(value); |
| + return value; |
| +} |
| + |
| + |
| DictionaryValue* SearchEngineSpecificsToValue( |
| const sync_pb::SearchEngineSpecifics& proto) { |
| DictionaryValue* value = new DictionaryValue(); |
| @@ -453,6 +467,7 @@ DictionaryValue* EntitySpecificsToValue( |
| SET_FIELD(nigori, NigoriSpecificsToValue); |
| SET_FIELD(password, PasswordSpecificsToValue); |
| SET_FIELD(preference, PreferenceSpecificsToValue); |
| + SET_FIELD(push_notifications, PushNotificationsSpecificsToValue); |
| SET_FIELD(search_engine, SearchEngineSpecificsToValue); |
| SET_FIELD(session, SessionSpecificsToValue); |
| SET_FIELD(theme, ThemeSpecificsToValue); |