| 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. | |
| 6 | |
| 7 #ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 5 #ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| 8 #define COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 6 #define COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| 9 | 7 |
| 10 #include <memory> | 8 #include <memory> |
| 11 | 9 |
| 12 namespace base { | 10 namespace base { |
| 13 class DictionaryValue; | 11 class DictionaryValue; |
| 14 } | 12 } |
| 15 | 13 |
| 16 namespace sync_pb { | 14 namespace sync_pb { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 class Target; | 75 class Target; |
| 78 class ThemeSpecifics; | 76 class ThemeSpecifics; |
| 79 class TimeRangeDirective; | 77 class TimeRangeDirective; |
| 80 class TypedUrlSpecifics; | 78 class TypedUrlSpecifics; |
| 81 class WalletMaskedCreditCard; | 79 class WalletMaskedCreditCard; |
| 82 class WalletMetadataSpecifics; | 80 class WalletMetadataSpecifics; |
| 83 class WalletPostalAddress; | 81 class WalletPostalAddress; |
| 84 class WifiCredentialSpecifics; | 82 class WifiCredentialSpecifics; |
| 85 } // namespace sync_pb | 83 } // namespace sync_pb |
| 86 | 84 |
| 85 // Keep this file in sync with the .proto files in this directory. |
| 86 // |
| 87 // Utility functions to convert sync protocol buffers to dictionaries. | 87 // Utility functions to convert sync protocol buffers to dictionaries. |
| 88 // Each protocol field is mapped to a key of the same name. Repeated | 88 // Each protocol field is mapped to a key of the same name. Repeated |
| 89 // fields are mapped to array values and sub-messages are mapped to | 89 // fields are mapped to array values and sub-messages are mapped to |
| 90 // sub-dictionary values. | 90 // sub-dictionary values. |
| 91 // | 91 // |
| 92 // TODO(akalin): Add has_* information. | 92 // TODO(akalin): Add has_* information. |
| 93 // | 93 // |
| 94 // TODO(akalin): Improve enum support. | 94 // TODO(akalin): Improve enum support. |
| 95 | 95 |
| 96 namespace syncer { | 96 namespace syncer { |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 | 315 |
| 316 std::unique_ptr<base::DictionaryValue> AttachmentIdProtoToValue( | 316 std::unique_ptr<base::DictionaryValue> AttachmentIdProtoToValue( |
| 317 const sync_pb::AttachmentIdProto& proto); | 317 const sync_pb::AttachmentIdProto& proto); |
| 318 | 318 |
| 319 std::unique_ptr<base::DictionaryValue> EntityMetadataToValue( | 319 std::unique_ptr<base::DictionaryValue> EntityMetadataToValue( |
| 320 const sync_pb::EntityMetadata& metadata); | 320 const sync_pb::EntityMetadata& metadata); |
| 321 | 321 |
| 322 } // namespace syncer | 322 } // namespace syncer |
| 323 | 323 |
| 324 #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 324 #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| OLD | NEW |