| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 class SyncedNotificationDestination; | 72 class SyncedNotificationDestination; |
| 73 class SyncedNotificationImage; | 73 class SyncedNotificationImage; |
| 74 class SyncedNotificationProfileImage; | 74 class SyncedNotificationProfileImage; |
| 75 class SyncedNotificationRenderInfo; | 75 class SyncedNotificationRenderInfo; |
| 76 class SyncedNotificationSpecifics; | 76 class SyncedNotificationSpecifics; |
| 77 class TabNavigation; | 77 class TabNavigation; |
| 78 class Target; | 78 class Target; |
| 79 class ThemeSpecifics; | 79 class ThemeSpecifics; |
| 80 class TimeRangeDirective; | 80 class TimeRangeDirective; |
| 81 class TypedUrlSpecifics; | 81 class TypedUrlSpecifics; |
| 82 class WifiCredentialSpecifics; |
| 82 } // namespace sync_pb | 83 } // namespace sync_pb |
| 83 | 84 |
| 84 // Utility functions to convert sync protocol buffers to dictionaries. | 85 // Utility functions to convert sync protocol buffers to dictionaries. |
| 85 // Each protocol field is mapped to a key of the same name. Repeated | 86 // Each protocol field is mapped to a key of the same name. Repeated |
| 86 // fields are mapped to array values and sub-messages are mapped to | 87 // fields are mapped to array values and sub-messages are mapped to |
| 87 // sub-dictionary values. | 88 // sub-dictionary values. |
| 88 // | 89 // |
| 89 // TODO(akalin): Add has_* information. | 90 // TODO(akalin): Add has_* information. |
| 90 // | 91 // |
| 91 // TODO(akalin): Improve enum support. | 92 // TODO(akalin): Improve enum support. |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 | 272 |
| 272 SYNC_EXPORT_PRIVATE base::DictionaryValue* SearchEngineSpecificsToValue( | 273 SYNC_EXPORT_PRIVATE base::DictionaryValue* SearchEngineSpecificsToValue( |
| 273 const sync_pb::SearchEngineSpecifics& search_engine_specifics); | 274 const sync_pb::SearchEngineSpecifics& search_engine_specifics); |
| 274 | 275 |
| 275 SYNC_EXPORT_PRIVATE base::DictionaryValue* ThemeSpecificsToValue( | 276 SYNC_EXPORT_PRIVATE base::DictionaryValue* ThemeSpecificsToValue( |
| 276 const sync_pb::ThemeSpecifics& theme_specifics); | 277 const sync_pb::ThemeSpecifics& theme_specifics); |
| 277 | 278 |
| 278 SYNC_EXPORT_PRIVATE base::DictionaryValue* TypedUrlSpecificsToValue( | 279 SYNC_EXPORT_PRIVATE base::DictionaryValue* TypedUrlSpecificsToValue( |
| 279 const sync_pb::TypedUrlSpecifics& typed_url_specifics); | 280 const sync_pb::TypedUrlSpecifics& typed_url_specifics); |
| 280 | 281 |
| 282 SYNC_EXPORT_PRIVATE base::DictionaryValue* WifiCredentialSpecificsToValue( |
| 283 const sync_pb::WifiCredentialSpecifics& wifi_credential_specifics); |
| 284 |
| 281 // Any present extensions are mapped to sub-dictionary values with the | 285 // Any present extensions are mapped to sub-dictionary values with the |
| 282 // key equal to the extension name. | 286 // key equal to the extension name. |
| 283 SYNC_EXPORT_PRIVATE base::DictionaryValue* EntitySpecificsToValue( | 287 SYNC_EXPORT_PRIVATE base::DictionaryValue* EntitySpecificsToValue( |
| 284 const sync_pb::EntitySpecifics& specifics); | 288 const sync_pb::EntitySpecifics& specifics); |
| 285 | 289 |
| 286 SYNC_EXPORT_PRIVATE base::DictionaryValue* SyncEntityToValue( | 290 SYNC_EXPORT_PRIVATE base::DictionaryValue* SyncEntityToValue( |
| 287 const sync_pb::SyncEntity& entity, | 291 const sync_pb::SyncEntity& entity, |
| 288 bool include_specifics); | 292 bool include_specifics); |
| 289 | 293 |
| 290 SYNC_EXPORT_PRIVATE base::DictionaryValue* ClientToServerMessageToValue( | 294 SYNC_EXPORT_PRIVATE base::DictionaryValue* ClientToServerMessageToValue( |
| (...skipping 18 matching lines...) Expand all Loading... |
| 309 | 313 |
| 310 base::DictionaryValue* ClientConfigParamsToValue( | 314 base::DictionaryValue* ClientConfigParamsToValue( |
| 311 const sync_pb::ClientConfigParams& proto); | 315 const sync_pb::ClientConfigParams& proto); |
| 312 | 316 |
| 313 SYNC_EXPORT_PRIVATE base::DictionaryValue* AttachmentIdProtoToValue( | 317 SYNC_EXPORT_PRIVATE base::DictionaryValue* AttachmentIdProtoToValue( |
| 314 const sync_pb::AttachmentIdProto& proto); | 318 const sync_pb::AttachmentIdProto& proto); |
| 315 | 319 |
| 316 } // namespace syncer | 320 } // namespace syncer |
| 317 | 321 |
| 318 #endif // SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 322 #endif // SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| OLD | NEW |