| 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 COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 7 #ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| 8 #define COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 8 #define COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 class ArcPackageSpecifics; | 22 class ArcPackageSpecifics; |
| 23 class ArticleSpecifics; | 23 class ArticleSpecifics; |
| 24 class AttachmentIdProto; | 24 class AttachmentIdProto; |
| 25 class AutofillProfileSpecifics; | 25 class AutofillProfileSpecifics; |
| 26 class AutofillSpecifics; | 26 class AutofillSpecifics; |
| 27 class AutofillWalletSpecifics; | 27 class AutofillWalletSpecifics; |
| 28 class BookmarkSpecifics; | 28 class BookmarkSpecifics; |
| 29 class ClientConfigParams; | 29 class ClientConfigParams; |
| 30 class ClientToServerMessage; | 30 class ClientToServerMessage; |
| 31 class ClientToServerResponse; | 31 class ClientToServerResponse; |
| 32 class CollapsedInfo; | |
| 33 class DatatypeAssociationStats; | 32 class DatatypeAssociationStats; |
| 34 class DebugEventInfo; | 33 class DebugEventInfo; |
| 35 class DebugInfo; | 34 class DebugInfo; |
| 36 class DeviceInfoSpecifics; | 35 class DeviceInfoSpecifics; |
| 37 class DeviceInformation; | |
| 38 class DictionarySpecifics; | 36 class DictionarySpecifics; |
| 39 class EncryptedData; | 37 class EncryptedData; |
| 40 class EntityMetadata; | 38 class EntityMetadata; |
| 41 class EntitySpecifics; | 39 class EntitySpecifics; |
| 42 class EverythingDirective; | |
| 43 class ExperimentsSpecifics; | 40 class ExperimentsSpecifics; |
| 44 class ExtensionSettingSpecifics; | 41 class ExtensionSettingSpecifics; |
| 45 class ExtensionSpecifics; | 42 class ExtensionSpecifics; |
| 46 class FaviconImageSpecifics; | 43 class FaviconImageSpecifics; |
| 47 class FaviconTrackingSpecifics; | 44 class FaviconTrackingSpecifics; |
| 48 class GlobalIdDirective; | 45 class GlobalIdDirective; |
| 49 class HistoryDeleteDirectiveSpecifics; | 46 class HistoryDeleteDirectiveSpecifics; |
| 50 class KeystoreEncryptionFlagsSpecifics; | |
| 51 class LinkedAppIconInfo; | 47 class LinkedAppIconInfo; |
| 52 class ManagedUserSettingSpecifics; | 48 class ManagedUserSettingSpecifics; |
| 53 class ManagedUserSharedSettingSpecifics; | 49 class ManagedUserSharedSettingSpecifics; |
| 54 class ManagedUserSpecifics; | 50 class ManagedUserSpecifics; |
| 55 class ManagedUserWhitelistSpecifics; | 51 class ManagedUserWhitelistSpecifics; |
| 56 class Media; | |
| 57 class NavigationRedirect; | 52 class NavigationRedirect; |
| 58 class NigoriSpecifics; | 53 class NigoriSpecifics; |
| 59 class PasswordSpecifics; | 54 class PasswordSpecifics; |
| 60 class PasswordSpecificsData; | 55 class PasswordSpecificsData; |
| 61 class PreferenceSpecifics; | 56 class PreferenceSpecifics; |
| 62 class PriorityPreferenceSpecifics; | 57 class PriorityPreferenceSpecifics; |
| 63 class PrinterPPDData; | 58 class PrinterPPDData; |
| 64 class PrinterSpecifics; | 59 class PrinterSpecifics; |
| 65 class ReadingListSpecifics; | 60 class ReadingListSpecifics; |
| 66 class SearchEngineSpecifics; | 61 class SearchEngineSpecifics; |
| 67 class SessionHeader; | 62 class SessionHeader; |
| 68 class SessionSpecifics; | 63 class SessionSpecifics; |
| 69 class SessionTab; | 64 class SessionTab; |
| 70 class SessionWindow; | 65 class SessionWindow; |
| 71 class SimpleCollapsedLayout; | |
| 72 class SyncCycleCompletedEventInfo; | 66 class SyncCycleCompletedEventInfo; |
| 73 class SyncEntity; | 67 class SyncEntity; |
| 74 class SyncedNotificationAppInfoSpecifics; | 68 class SyncedNotificationAppInfoSpecifics; |
| 75 class SyncedNotificationSpecifics; | 69 class SyncedNotificationSpecifics; |
| 76 class TabNavigation; | 70 class TabNavigation; |
| 77 class Target; | |
| 78 class ThemeSpecifics; | 71 class ThemeSpecifics; |
| 79 class TimeRangeDirective; | 72 class TimeRangeDirective; |
| 80 class TypedUrlSpecifics; | 73 class TypedUrlSpecifics; |
| 81 class WalletMaskedCreditCard; | 74 class WalletMaskedCreditCard; |
| 82 class WalletMetadataSpecifics; | 75 class WalletMetadataSpecifics; |
| 83 class WalletPostalAddress; | 76 class WalletPostalAddress; |
| 84 class WifiCredentialSpecifics; | 77 class WifiCredentialSpecifics; |
| 85 } // namespace sync_pb | 78 } // namespace sync_pb |
| 86 | 79 |
| 87 // Utility functions to convert sync protocol buffers to dictionaries. | 80 // Utility functions to convert sync protocol buffers to dictionaries. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 100 | 93 |
| 101 // TODO(akalin): Perhaps extend this to decrypt? | 94 // TODO(akalin): Perhaps extend this to decrypt? |
| 102 std::unique_ptr<base::DictionaryValue> EncryptedDataToValue( | 95 std::unique_ptr<base::DictionaryValue> EncryptedDataToValue( |
| 103 const sync_pb::EncryptedData& encrypted_data); | 96 const sync_pb::EncryptedData& encrypted_data); |
| 104 | 97 |
| 105 // Sub-protocol of AppListSpecifics. | 98 // Sub-protocol of AppListSpecifics. |
| 106 std::unique_ptr<base::DictionaryValue> AppListSpecificsToValue( | 99 std::unique_ptr<base::DictionaryValue> AppListSpecificsToValue( |
| 107 const sync_pb::AppListSpecifics& proto); | 100 const sync_pb::AppListSpecifics& proto); |
| 108 | 101 |
| 109 // Sub-protocols of AppSpecifics. | 102 // Sub-protocols of AppSpecifics. |
| 110 std::unique_ptr<base::DictionaryValue> AppSettingsToValue( | 103 std::unique_ptr<base::DictionaryValue> AppNotificationSettingsToValue( |
| 111 const sync_pb::AppNotificationSettings& app_notification_settings); | 104 const sync_pb::AppNotificationSettings& app_notification_settings); |
| 112 | 105 |
| 113 std::unique_ptr<base::DictionaryValue> LinkedAppIconInfoToValue( | 106 std::unique_ptr<base::DictionaryValue> LinkedAppIconInfoToValue( |
| 114 const sync_pb::LinkedAppIconInfo& linked_app_icon_info); | 107 const sync_pb::LinkedAppIconInfo& linked_app_icon_info); |
| 115 | 108 |
| 116 // Sub-protocol of ArcPackageSpecifics. | 109 // Sub-protocol of ArcPackageSpecifics. |
| 117 std::unique_ptr<base::DictionaryValue> ArcPackageSpecificsToValue( | 110 std::unique_ptr<base::DictionaryValue> ArcPackageSpecificsToValue( |
| 118 const sync_pb::ArcPackageSpecifics& proto); | 111 const sync_pb::ArcPackageSpecifics& proto); |
| 119 | 112 |
| 120 // Sub-protocols of SessionSpecifics. | 113 // Sub-protocols of SessionSpecifics. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 132 const sync_pb::TabNavigation& tab_navigation); | 125 const sync_pb::TabNavigation& tab_navigation); |
| 133 | 126 |
| 134 std::unique_ptr<base::DictionaryValue> NavigationRedirectToValue( | 127 std::unique_ptr<base::DictionaryValue> NavigationRedirectToValue( |
| 135 const sync_pb::NavigationRedirect& navigation_redirect); | 128 const sync_pb::NavigationRedirect& navigation_redirect); |
| 136 | 129 |
| 137 // Sub-protocol of PasswordSpecifics. | 130 // Sub-protocol of PasswordSpecifics. |
| 138 | 131 |
| 139 std::unique_ptr<base::DictionaryValue> PasswordSpecificsDataToValue( | 132 std::unique_ptr<base::DictionaryValue> PasswordSpecificsDataToValue( |
| 140 const sync_pb::PasswordSpecificsData& password_specifics_data); | 133 const sync_pb::PasswordSpecificsData& password_specifics_data); |
| 141 | 134 |
| 142 // Sub-protocol of NigoriSpecifics. | |
| 143 | |
| 144 std::unique_ptr<base::DictionaryValue> DeviceInformationToValue( | |
| 145 const sync_pb::DeviceInformation& device_information); | |
| 146 | |
| 147 // Sub-protocol of HistoryDeleteDirectiveSpecifics. | 135 // Sub-protocol of HistoryDeleteDirectiveSpecifics. |
| 148 | 136 |
| 149 std::unique_ptr<base::DictionaryValue> GlobalIdDirectiveToValue( | 137 std::unique_ptr<base::DictionaryValue> GlobalIdDirectiveToValue( |
| 150 const sync_pb::GlobalIdDirective& global_id_directive); | 138 const sync_pb::GlobalIdDirective& global_id_directive); |
| 151 | 139 |
| 152 std::unique_ptr<base::DictionaryValue> TimeRangeDirectiveToValue( | 140 std::unique_ptr<base::DictionaryValue> TimeRangeDirectiveToValue( |
| 153 const sync_pb::TimeRangeDirective& time_range_directive); | 141 const sync_pb::TimeRangeDirective& time_range_directive); |
| 154 | 142 |
| 155 // Sub-protocol of Experiments. | 143 // Sub-protocol of Experiments. |
| 156 | 144 |
| 157 std::unique_ptr<base::DictionaryValue> KeystoreEncryptionToValue( | |
| 158 const sync_pb::KeystoreEncryptionFlagsSpecifics& proto); | |
| 159 | |
| 160 std::unique_ptr<base::DictionaryValue> SessionSpecificsToValue( | 145 std::unique_ptr<base::DictionaryValue> SessionSpecificsToValue( |
| 161 const sync_pb::SessionSpecifics& session_specifics); | 146 const sync_pb::SessionSpecifics& session_specifics); |
| 162 | 147 |
| 163 // Sub-protocol of PrinterSpecifics. | 148 // Sub-protocol of PrinterSpecifics. |
| 164 | 149 |
| 165 std::unique_ptr<base::DictionaryValue> PrinterPPDDataToValue( | 150 std::unique_ptr<base::DictionaryValue> PrinterPPDDataToValue( |
| 166 const sync_pb::PrinterPPDData& proto); | 151 const sync_pb::PrinterPPDData& proto); |
| 167 | 152 |
| 168 // Main *SpecificsToValue functions. | 153 // Main *SpecificsToValue functions. |
| 169 | 154 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 const sync_pb::ManagedUserSpecifics& managed_user_specifics); | 214 const sync_pb::ManagedUserSpecifics& managed_user_specifics); |
| 230 | 215 |
| 231 std::unique_ptr<base::DictionaryValue> ManagedUserSharedSettingSpecificsToValue( | 216 std::unique_ptr<base::DictionaryValue> ManagedUserSharedSettingSpecificsToValue( |
| 232 const sync_pb::ManagedUserSharedSettingSpecifics& | 217 const sync_pb::ManagedUserSharedSettingSpecifics& |
| 233 managed_user_shared_setting_specifics); | 218 managed_user_shared_setting_specifics); |
| 234 | 219 |
| 235 std::unique_ptr<base::DictionaryValue> ManagedUserWhitelistSpecificsToValue( | 220 std::unique_ptr<base::DictionaryValue> ManagedUserWhitelistSpecificsToValue( |
| 236 const sync_pb::ManagedUserWhitelistSpecifics& | 221 const sync_pb::ManagedUserWhitelistSpecifics& |
| 237 managed_user_whitelist_specifics); | 222 managed_user_whitelist_specifics); |
| 238 | 223 |
| 239 std::unique_ptr<base::DictionaryValue> MediaToValue( | |
| 240 const sync_pb::Media& media); | |
| 241 | |
| 242 std::unique_ptr<base::DictionaryValue> NigoriSpecificsToValue( | 224 std::unique_ptr<base::DictionaryValue> NigoriSpecificsToValue( |
| 243 const sync_pb::NigoriSpecifics& nigori_specifics); | 225 const sync_pb::NigoriSpecifics& nigori_specifics); |
| 244 | 226 |
| 245 std::unique_ptr<base::DictionaryValue> PasswordSpecificsToValue( | 227 std::unique_ptr<base::DictionaryValue> PasswordSpecificsToValue( |
| 246 const sync_pb::PasswordSpecifics& password_specifics); | 228 const sync_pb::PasswordSpecifics& password_specifics); |
| 247 | 229 |
| 248 std::unique_ptr<base::DictionaryValue> PreferenceSpecificsToValue( | 230 std::unique_ptr<base::DictionaryValue> PreferenceSpecificsToValue( |
| 249 const sync_pb::PreferenceSpecifics& password_specifics); | 231 const sync_pb::PreferenceSpecifics& password_specifics); |
| 250 | 232 |
| 251 std::unique_ptr<base::DictionaryValue> PrinterSpecificsToValue( | 233 std::unique_ptr<base::DictionaryValue> PrinterSpecificsToValue( |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 | 297 |
| 316 std::unique_ptr<base::DictionaryValue> AttachmentIdProtoToValue( | 298 std::unique_ptr<base::DictionaryValue> AttachmentIdProtoToValue( |
| 317 const sync_pb::AttachmentIdProto& proto); | 299 const sync_pb::AttachmentIdProto& proto); |
| 318 | 300 |
| 319 std::unique_ptr<base::DictionaryValue> EntityMetadataToValue( | 301 std::unique_ptr<base::DictionaryValue> EntityMetadataToValue( |
| 320 const sync_pb::EntityMetadata& metadata); | 302 const sync_pb::EntityMetadata& metadata); |
| 321 | 303 |
| 322 } // namespace syncer | 304 } // namespace syncer |
| 323 | 305 |
| 324 #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 306 #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| OLD | NEW |