| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Keep this file in sync with the .proto files in this directory. | 5 // Keep this file in sync with the .proto files in this directory. |
| 6 | 6 |
| 7 #ifndef SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 7 #ifndef SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| 8 #define SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 8 #define SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| 9 | 9 |
| 10 #include "sync/base/sync_export.h" | 10 #include "sync/base/sync_export.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 class SyncedNotificationDestination; | 71 class SyncedNotificationDestination; |
| 72 class SyncedNotificationImage; | 72 class SyncedNotificationImage; |
| 73 class SyncedNotificationProfileImage; | 73 class SyncedNotificationProfileImage; |
| 74 class SyncedNotificationRenderInfo; | 74 class SyncedNotificationRenderInfo; |
| 75 class SyncedNotificationSpecifics; | 75 class SyncedNotificationSpecifics; |
| 76 class TabNavigation; | 76 class TabNavigation; |
| 77 class Target; | 77 class Target; |
| 78 class ThemeSpecifics; | 78 class ThemeSpecifics; |
| 79 class TimeRangeDirective; | 79 class TimeRangeDirective; |
| 80 class TypedUrlSpecifics; | 80 class TypedUrlSpecifics; |
| 81 class WifiCredentialSpecifics; |
| 81 } // namespace sync_pb | 82 } // namespace sync_pb |
| 82 | 83 |
| 83 // Utility functions to convert sync protocol buffers to dictionaries. | 84 // Utility functions to convert sync protocol buffers to dictionaries. |
| 84 // Each protocol field is mapped to a key of the same name. Repeated | 85 // Each protocol field is mapped to a key of the same name. Repeated |
| 85 // fields are mapped to array values and sub-messages are mapped to | 86 // fields are mapped to array values and sub-messages are mapped to |
| 86 // sub-dictionary values. | 87 // sub-dictionary values. |
| 87 // | 88 // |
| 88 // TODO(akalin): Add has_* information. | 89 // TODO(akalin): Add has_* information. |
| 89 // | 90 // |
| 90 // TODO(akalin): Improve enum support. | 91 // TODO(akalin): Improve enum support. |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 | 268 |
| 268 SYNC_EXPORT_PRIVATE base::DictionaryValue* SearchEngineSpecificsToValue( | 269 SYNC_EXPORT_PRIVATE base::DictionaryValue* SearchEngineSpecificsToValue( |
| 269 const sync_pb::SearchEngineSpecifics& search_engine_specifics); | 270 const sync_pb::SearchEngineSpecifics& search_engine_specifics); |
| 270 | 271 |
| 271 SYNC_EXPORT_PRIVATE base::DictionaryValue* ThemeSpecificsToValue( | 272 SYNC_EXPORT_PRIVATE base::DictionaryValue* ThemeSpecificsToValue( |
| 272 const sync_pb::ThemeSpecifics& theme_specifics); | 273 const sync_pb::ThemeSpecifics& theme_specifics); |
| 273 | 274 |
| 274 SYNC_EXPORT_PRIVATE base::DictionaryValue* TypedUrlSpecificsToValue( | 275 SYNC_EXPORT_PRIVATE base::DictionaryValue* TypedUrlSpecificsToValue( |
| 275 const sync_pb::TypedUrlSpecifics& typed_url_specifics); | 276 const sync_pb::TypedUrlSpecifics& typed_url_specifics); |
| 276 | 277 |
| 278 SYNC_EXPORT_PRIVATE base::DictionaryValue* WifiCredentialSpecificsToValue( |
| 279 const sync_pb::WifiCredentialSpecifics& wifi_credential_specifics); |
| 280 |
| 277 // Any present extensions are mapped to sub-dictionary values with the | 281 // Any present extensions are mapped to sub-dictionary values with the |
| 278 // key equal to the extension name. | 282 // key equal to the extension name. |
| 279 SYNC_EXPORT_PRIVATE base::DictionaryValue* EntitySpecificsToValue( | 283 SYNC_EXPORT_PRIVATE base::DictionaryValue* EntitySpecificsToValue( |
| 280 const sync_pb::EntitySpecifics& specifics); | 284 const sync_pb::EntitySpecifics& specifics); |
| 281 | 285 |
| 282 SYNC_EXPORT_PRIVATE base::DictionaryValue* SyncEntityToValue( | 286 SYNC_EXPORT_PRIVATE base::DictionaryValue* SyncEntityToValue( |
| 283 const sync_pb::SyncEntity& entity, | 287 const sync_pb::SyncEntity& entity, |
| 284 bool include_specifics); | 288 bool include_specifics); |
| 285 | 289 |
| 286 SYNC_EXPORT_PRIVATE base::DictionaryValue* ClientToServerMessageToValue( | 290 SYNC_EXPORT_PRIVATE base::DictionaryValue* ClientToServerMessageToValue( |
| (...skipping 18 matching lines...) Expand all Loading... |
| 305 | 309 |
| 306 base::DictionaryValue* ClientConfigParamsToValue( | 310 base::DictionaryValue* ClientConfigParamsToValue( |
| 307 const sync_pb::ClientConfigParams& proto); | 311 const sync_pb::ClientConfigParams& proto); |
| 308 | 312 |
| 309 SYNC_EXPORT_PRIVATE base::DictionaryValue* AttachmentIdProtoToValue( | 313 SYNC_EXPORT_PRIVATE base::DictionaryValue* AttachmentIdProtoToValue( |
| 310 const sync_pb::AttachmentIdProto& proto); | 314 const sync_pb::AttachmentIdProto& proto); |
| 311 | 315 |
| 312 } // namespace syncer | 316 } // namespace syncer |
| 313 | 317 |
| 314 #endif // SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 318 #endif // SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| OLD | NEW |