Chromium Code Reviews| 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 #ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 5 #ifndef COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| 6 #define COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 6 #define COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 class WalletPostalAddress; | 75 class WalletPostalAddress; |
| 76 class WifiCredentialSpecifics; | 76 class WifiCredentialSpecifics; |
| 77 } // namespace sync_pb | 77 } // namespace sync_pb |
| 78 | 78 |
| 79 // Keep this file in sync with the .proto files in this directory. | 79 // Keep this file in sync with the .proto files in this directory. |
| 80 // | 80 // |
| 81 // Utility functions to convert sync protocol buffers to dictionaries. | 81 // Utility functions to convert sync protocol buffers to dictionaries. |
| 82 // Each protocol field is mapped to a key of the same name. Repeated | 82 // Each protocol field is mapped to a key of the same name. Repeated |
| 83 // fields are mapped to array values and sub-messages are mapped to | 83 // fields are mapped to array values and sub-messages are mapped to |
| 84 // sub-dictionary values. | 84 // sub-dictionary values. |
| 85 // | |
| 86 // TODO(akalin): Add has_* information. | |
| 87 // | |
| 88 // TODO(akalin): Improve enum support. | |
| 89 | 85 |
| 90 namespace syncer { | 86 namespace syncer { |
| 91 | 87 |
| 92 // Ownership of all returned DictionaryValues are transferred to the | |
| 93 // caller. | |
| 94 | |
| 95 // TODO(akalin): Perhaps extend this to decrypt? | |
| 96 std::unique_ptr<base::DictionaryValue> EncryptedDataToValue( | |
| 97 const sync_pb::EncryptedData& encrypted_data); | |
| 98 | |
| 99 // Sub-protocol of AppListSpecifics. | |
| 100 std::unique_ptr<base::DictionaryValue> AppListSpecificsToValue( | 88 std::unique_ptr<base::DictionaryValue> AppListSpecificsToValue( |
| 101 const sync_pb::AppListSpecifics& proto); | 89 const sync_pb::AppListSpecifics& proto); |
| 102 | 90 |
| 103 // Sub-protocols of AppSpecifics. | 91 std::unique_ptr<base::DictionaryValue> AppNotificationToValue( |
| 92 const sync_pb::AppNotification& app_notification_specifics); | |
| 93 | |
| 104 std::unique_ptr<base::DictionaryValue> AppNotificationSettingsToValue( | 94 std::unique_ptr<base::DictionaryValue> AppNotificationSettingsToValue( |
| 105 const sync_pb::AppNotificationSettings& app_notification_settings); | 95 const sync_pb::AppNotificationSettings& app_notification_settings); |
| 106 | 96 |
| 107 std::unique_ptr<base::DictionaryValue> LinkedAppIconInfoToValue( | |
| 108 const sync_pb::LinkedAppIconInfo& linked_app_icon_info); | |
| 109 | |
| 110 // Sub-protocol of ArcPackageSpecifics. | |
| 111 std::unique_ptr<base::DictionaryValue> ArcPackageSpecificsToValue( | |
| 112 const sync_pb::ArcPackageSpecifics& proto); | |
| 113 | |
| 114 // Sub-protocols of SessionSpecifics. | |
| 115 | |
| 116 std::unique_ptr<base::DictionaryValue> SessionHeaderToValue( | |
| 117 const sync_pb::SessionHeader& session_header); | |
| 118 | |
| 119 std::unique_ptr<base::DictionaryValue> SessionTabToValue( | |
| 120 const sync_pb::SessionTab& session_tab); | |
| 121 | |
| 122 std::unique_ptr<base::DictionaryValue> SessionWindowToValue( | |
| 123 const sync_pb::SessionWindow& session_window); | |
| 124 | |
| 125 std::unique_ptr<base::DictionaryValue> TabNavigationToValue( | |
| 126 const sync_pb::TabNavigation& tab_navigation); | |
| 127 | |
| 128 std::unique_ptr<base::DictionaryValue> NavigationRedirectToValue( | |
| 129 const sync_pb::NavigationRedirect& navigation_redirect); | |
| 130 | |
| 131 // Sub-protocol of PasswordSpecifics. | |
| 132 | |
| 133 std::unique_ptr<base::DictionaryValue> PasswordSpecificsDataToValue( | |
| 134 const sync_pb::PasswordSpecificsData& password_specifics_data); | |
| 135 | |
| 136 // Sub-protocol of HistoryDeleteDirectiveSpecifics. | |
| 137 | |
| 138 std::unique_ptr<base::DictionaryValue> GlobalIdDirectiveToValue( | |
| 139 const sync_pb::GlobalIdDirective& global_id_directive); | |
| 140 | |
| 141 std::unique_ptr<base::DictionaryValue> TimeRangeDirectiveToValue( | |
| 142 const sync_pb::TimeRangeDirective& time_range_directive); | |
| 143 | |
| 144 // Sub-protocol of Experiments. | |
| 145 | |
| 146 std::unique_ptr<base::DictionaryValue> SessionSpecificsToValue( | |
| 147 const sync_pb::SessionSpecifics& session_specifics); | |
| 148 | |
| 149 // Sub-protocol of PrinterSpecifics. | |
| 150 | |
| 151 std::unique_ptr<base::DictionaryValue> PrinterPPDReferenceToValue( | |
| 152 const sync_pb::PrinterPPDReference& proto); | |
| 153 | |
| 154 // Main *SpecificsToValue functions. | |
| 155 | |
| 156 std::unique_ptr<base::DictionaryValue> AppNotificationToValue( | |
| 157 const sync_pb::AppNotification& app_notification_specifics); | |
| 158 | |
| 159 std::unique_ptr<base::DictionaryValue> AppSettingSpecificsToValue( | 97 std::unique_ptr<base::DictionaryValue> AppSettingSpecificsToValue( |
| 160 const sync_pb::AppSettingSpecifics& app_setting_specifics); | 98 const sync_pb::AppSettingSpecifics& app_setting_specifics); |
| 161 | 99 |
| 162 std::unique_ptr<base::DictionaryValue> AppSpecificsToValue( | 100 std::unique_ptr<base::DictionaryValue> AppSpecificsToValue( |
| 163 const sync_pb::AppSpecifics& app_specifics); | 101 const sync_pb::AppSpecifics& app_specifics); |
| 164 | 102 |
| 103 std::unique_ptr<base::DictionaryValue> ArcPackageSpecificsToValue( | |
| 104 const sync_pb::ArcPackageSpecifics& proto); | |
| 105 | |
| 165 std::unique_ptr<base::DictionaryValue> ArticleSpecificsToValue( | 106 std::unique_ptr<base::DictionaryValue> ArticleSpecificsToValue( |
| 166 const sync_pb::ArticleSpecifics& article_specifics); | 107 const sync_pb::ArticleSpecifics& article_specifics); |
| 167 | 108 |
| 109 std::unique_ptr<base::DictionaryValue> AttachmentIdProtoToValue( | |
| 110 const sync_pb::AttachmentIdProto& proto); | |
| 111 | |
| 112 std::unique_ptr<base::DictionaryValue> AutofillProfileSpecificsToValue( | |
| 113 const sync_pb::AutofillProfileSpecifics& autofill_profile_specifics); | |
| 114 | |
| 168 std::unique_ptr<base::DictionaryValue> AutofillSpecificsToValue( | 115 std::unique_ptr<base::DictionaryValue> AutofillSpecificsToValue( |
| 169 const sync_pb::AutofillSpecifics& autofill_specifics); | 116 const sync_pb::AutofillSpecifics& autofill_specifics); |
| 170 | 117 |
| 171 std::unique_ptr<base::DictionaryValue> AutofillProfileSpecificsToValue( | |
| 172 const sync_pb::AutofillProfileSpecifics& autofill_profile_specifics); | |
| 173 | |
| 174 std::unique_ptr<base::DictionaryValue> WalletMetadataSpecificsToValue( | |
| 175 const sync_pb::WalletMetadataSpecifics& wallet_metadata_specifics); | |
| 176 | |
| 177 std::unique_ptr<base::DictionaryValue> AutofillWalletSpecificsToValue( | 118 std::unique_ptr<base::DictionaryValue> AutofillWalletSpecificsToValue( |
| 178 const sync_pb::AutofillWalletSpecifics& autofill_wallet_specifics); | 119 const sync_pb::AutofillWalletSpecifics& autofill_wallet_specifics); |
| 179 | 120 |
| 180 std::unique_ptr<base::DictionaryValue> BookmarkSpecificsToValue( | 121 std::unique_ptr<base::DictionaryValue> BookmarkSpecificsToValue( |
| 181 const sync_pb::BookmarkSpecifics& bookmark_specifics); | 122 const sync_pb::BookmarkSpecifics& bookmark_specifics); |
| 182 | 123 |
| 124 std::unique_ptr<base::DictionaryValue> ClientConfigParamsToValue( | |
| 125 const sync_pb::ClientConfigParams& proto); | |
| 126 | |
| 127 std::unique_ptr<base::DictionaryValue> DatatypeAssociationStatsToValue( | |
| 128 const sync_pb::DatatypeAssociationStats& proto); | |
| 129 | |
| 130 std::unique_ptr<base::DictionaryValue> DebugEventInfoToValue( | |
| 131 const sync_pb::DebugEventInfo& proto); | |
| 132 | |
| 133 std::unique_ptr<base::DictionaryValue> DebugInfoToValue( | |
| 134 const sync_pb::DebugInfo& proto); | |
| 135 | |
| 183 std::unique_ptr<base::DictionaryValue> DeviceInfoSpecificsToValue( | 136 std::unique_ptr<base::DictionaryValue> DeviceInfoSpecificsToValue( |
| 184 const sync_pb::DeviceInfoSpecifics& device_info_specifics); | 137 const sync_pb::DeviceInfoSpecifics& device_info_specifics); |
| 185 | 138 |
| 186 std::unique_ptr<base::DictionaryValue> DictionarySpecificsToValue( | 139 std::unique_ptr<base::DictionaryValue> DictionarySpecificsToValue( |
| 187 const sync_pb::DictionarySpecifics& dictionary_specifics); | 140 const sync_pb::DictionarySpecifics& dictionary_specifics); |
| 188 | 141 |
| 142 std::unique_ptr<base::DictionaryValue> EncryptedDataToValue( | |
| 143 const sync_pb::EncryptedData& encrypted_data); | |
| 144 | |
| 145 std::unique_ptr<base::DictionaryValue> EntityMetadataToValue( | |
| 146 const sync_pb::EntityMetadata& metadata); | |
| 147 | |
| 148 std::unique_ptr<base::DictionaryValue> EntitySpecificsToValue( | |
| 149 const sync_pb::EntitySpecifics& specifics); | |
| 150 | |
| 189 std::unique_ptr<base::DictionaryValue> ExperimentsSpecificsToValue( | 151 std::unique_ptr<base::DictionaryValue> ExperimentsSpecificsToValue( |
| 190 const sync_pb::ExperimentsSpecifics& proto); | 152 const sync_pb::ExperimentsSpecifics& proto); |
| 191 | 153 |
| 192 std::unique_ptr<base::DictionaryValue> ExtensionSettingSpecificsToValue( | 154 std::unique_ptr<base::DictionaryValue> ExtensionSettingSpecificsToValue( |
| 193 const sync_pb::ExtensionSettingSpecifics& extension_setting_specifics); | 155 const sync_pb::ExtensionSettingSpecifics& extension_setting_specifics); |
| 194 | 156 |
| 195 std::unique_ptr<base::DictionaryValue> ExtensionSpecificsToValue( | 157 std::unique_ptr<base::DictionaryValue> ExtensionSpecificsToValue( |
| 196 const sync_pb::ExtensionSpecifics& extension_specifics); | 158 const sync_pb::ExtensionSpecifics& extension_specifics); |
| 197 | 159 |
| 198 std::unique_ptr<base::DictionaryValue> FaviconImageSpecificsToValue( | 160 std::unique_ptr<base::DictionaryValue> FaviconImageSpecificsToValue( |
| 199 const sync_pb::FaviconImageSpecifics& favicon_image_specifics); | 161 const sync_pb::FaviconImageSpecifics& favicon_image_specifics); |
| 200 | 162 |
| 201 std::unique_ptr<base::DictionaryValue> FaviconTrackingSpecificsToValue( | 163 std::unique_ptr<base::DictionaryValue> FaviconTrackingSpecificsToValue( |
| 202 const sync_pb::FaviconTrackingSpecifics& favicon_tracking_specifics); | 164 const sync_pb::FaviconTrackingSpecifics& favicon_tracking_specifics); |
| 203 | 165 |
| 166 std::unique_ptr<base::DictionaryValue> GlobalIdDirectiveToValue( | |
| 167 const sync_pb::GlobalIdDirective& global_id_directive); | |
| 168 | |
| 204 std::unique_ptr<base::DictionaryValue> HistoryDeleteDirectiveSpecificsToValue( | 169 std::unique_ptr<base::DictionaryValue> HistoryDeleteDirectiveSpecificsToValue( |
| 205 const sync_pb::HistoryDeleteDirectiveSpecifics& | 170 const sync_pb::HistoryDeleteDirectiveSpecifics& |
| 206 history_delete_directive_specifics); | 171 history_delete_directive_specifics); |
| 207 | 172 |
| 173 std::unique_ptr<base::DictionaryValue> LinkedAppIconInfoToValue( | |
| 174 const sync_pb::LinkedAppIconInfo& linked_app_icon_info); | |
| 175 | |
| 208 std::unique_ptr<base::DictionaryValue> ManagedUserSettingSpecificsToValue( | 176 std::unique_ptr<base::DictionaryValue> ManagedUserSettingSpecificsToValue( |
| 209 const sync_pb::ManagedUserSettingSpecifics& managed_user_setting_specifics); | 177 const sync_pb::ManagedUserSettingSpecifics& managed_user_setting_specifics); |
| 210 | 178 |
| 211 std::unique_ptr<base::DictionaryValue> ManagedUserSpecificsToValue( | |
| 212 const sync_pb::ManagedUserSpecifics& managed_user_specifics); | |
| 213 | |
| 214 std::unique_ptr<base::DictionaryValue> ManagedUserSharedSettingSpecificsToValue( | 179 std::unique_ptr<base::DictionaryValue> ManagedUserSharedSettingSpecificsToValue( |
| 215 const sync_pb::ManagedUserSharedSettingSpecifics& | 180 const sync_pb::ManagedUserSharedSettingSpecifics& |
| 216 managed_user_shared_setting_specifics); | 181 managed_user_shared_setting_specifics); |
| 217 | 182 |
| 183 std::unique_ptr<base::DictionaryValue> ManagedUserSpecificsToValue( | |
| 184 const sync_pb::ManagedUserSpecifics& managed_user_specifics); | |
| 185 | |
| 218 std::unique_ptr<base::DictionaryValue> ManagedUserWhitelistSpecificsToValue( | 186 std::unique_ptr<base::DictionaryValue> ManagedUserWhitelistSpecificsToValue( |
| 219 const sync_pb::ManagedUserWhitelistSpecifics& | 187 const sync_pb::ManagedUserWhitelistSpecifics& |
| 220 managed_user_whitelist_specifics); | 188 managed_user_whitelist_specifics); |
| 221 | 189 |
| 190 std::unique_ptr<base::DictionaryValue> NavigationRedirectToValue( | |
| 191 const sync_pb::NavigationRedirect& navigation_redirect); | |
| 192 | |
| 222 std::unique_ptr<base::DictionaryValue> NigoriSpecificsToValue( | 193 std::unique_ptr<base::DictionaryValue> NigoriSpecificsToValue( |
| 223 const sync_pb::NigoriSpecifics& nigori_specifics); | 194 const sync_pb::NigoriSpecifics& nigori_specifics); |
| 224 | 195 |
| 225 std::unique_ptr<base::DictionaryValue> PasswordSpecificsToValue( | 196 std::unique_ptr<base::DictionaryValue> PasswordSpecificsToValue( |
| 226 const sync_pb::PasswordSpecifics& password_specifics); | 197 const sync_pb::PasswordSpecifics& password_specifics); |
| 227 | 198 |
| 199 std::unique_ptr<base::DictionaryValue> PasswordSpecificsDataToValue( | |
| 200 const sync_pb::PasswordSpecificsData& password_specifics_data); | |
| 201 | |
| 228 std::unique_ptr<base::DictionaryValue> PreferenceSpecificsToValue( | 202 std::unique_ptr<base::DictionaryValue> PreferenceSpecificsToValue( |
| 229 const sync_pb::PreferenceSpecifics& password_specifics); | 203 const sync_pb::PreferenceSpecifics& password_specifics); |
| 230 | 204 |
| 205 std::unique_ptr<base::DictionaryValue> PrinterPPDReferenceToValue( | |
| 206 const sync_pb::PrinterPPDReference& proto); | |
| 207 | |
| 231 std::unique_ptr<base::DictionaryValue> PrinterSpecificsToValue( | 208 std::unique_ptr<base::DictionaryValue> PrinterSpecificsToValue( |
| 232 const sync_pb::PrinterSpecifics& printer_specifics); | 209 const sync_pb::PrinterSpecifics& printer_specifics); |
| 233 | 210 |
| 234 std::unique_ptr<base::DictionaryValue> PriorityPreferenceSpecificsToValue( | 211 std::unique_ptr<base::DictionaryValue> PriorityPreferenceSpecificsToValue( |
| 235 const sync_pb::PriorityPreferenceSpecifics& proto); | 212 const sync_pb::PriorityPreferenceSpecifics& proto); |
| 236 | 213 |
| 237 // Sub-protocol of ReadingListSpecifics. | |
| 238 std::unique_ptr<base::DictionaryValue> ReadingListSpecificsToValue( | 214 std::unique_ptr<base::DictionaryValue> ReadingListSpecificsToValue( |
| 239 const sync_pb::ReadingListSpecifics& proto); | 215 const sync_pb::ReadingListSpecifics& proto); |
| 240 | 216 |
| 217 std::unique_ptr<base::DictionaryValue> SearchEngineSpecificsToValue( | |
| 218 const sync_pb::SearchEngineSpecifics& search_engine_specifics); | |
| 219 | |
| 220 std::unique_ptr<base::DictionaryValue> SessionHeaderToValue( | |
| 221 const sync_pb::SessionHeader& session_header); | |
| 222 | |
| 223 std::unique_ptr<base::DictionaryValue> SessionSpecificsToValue( | |
| 224 const sync_pb::SessionSpecifics& session_specifics); | |
| 225 | |
| 226 std::unique_ptr<base::DictionaryValue> SessionTabToValue( | |
| 227 const sync_pb::SessionTab& session_tab); | |
| 228 | |
| 229 std::unique_ptr<base::DictionaryValue> SessionWindowToValue( | |
| 230 const sync_pb::SessionWindow& session_window); | |
| 231 | |
| 232 std::unique_ptr<base::DictionaryValue> SyncCycleCompletedEventInfoToValue( | |
| 233 const sync_pb::SyncCycleCompletedEventInfo& proto); | |
| 234 | |
| 241 std::unique_ptr<base::DictionaryValue> | 235 std::unique_ptr<base::DictionaryValue> |
| 242 SyncedNotificationAppInfoSpecificsToValue( | 236 SyncedNotificationAppInfoSpecificsToValue( |
| 243 const sync_pb::SyncedNotificationAppInfoSpecifics& | 237 const sync_pb::SyncedNotificationAppInfoSpecifics& |
| 244 synced_notification_specifics); | 238 synced_notification_specifics); |
| 245 | 239 |
| 246 std::unique_ptr<base::DictionaryValue> SyncedNotificationSpecificsToValue( | 240 std::unique_ptr<base::DictionaryValue> SyncedNotificationSpecificsToValue( |
| 247 const sync_pb::SyncedNotificationSpecifics& synced_notification_specifics); | 241 const sync_pb::SyncedNotificationSpecifics& synced_notification_specifics); |
| 248 | 242 |
| 249 std::unique_ptr<base::DictionaryValue> SearchEngineSpecificsToValue( | 243 std::unique_ptr<base::DictionaryValue> TabNavigationToValue( |
| 250 const sync_pb::SearchEngineSpecifics& search_engine_specifics); | 244 const sync_pb::TabNavigation& tab_navigation); |
| 251 | 245 |
| 252 std::unique_ptr<base::DictionaryValue> ThemeSpecificsToValue( | 246 std::unique_ptr<base::DictionaryValue> ThemeSpecificsToValue( |
| 253 const sync_pb::ThemeSpecifics& theme_specifics); | 247 const sync_pb::ThemeSpecifics& theme_specifics); |
| 254 | 248 |
| 249 std::unique_ptr<base::DictionaryValue> TimeRangeDirectiveToValue( | |
| 250 const sync_pb::TimeRangeDirective& time_range_directive); | |
| 251 | |
| 255 std::unique_ptr<base::DictionaryValue> TypedUrlSpecificsToValue( | 252 std::unique_ptr<base::DictionaryValue> TypedUrlSpecificsToValue( |
| 256 const sync_pb::TypedUrlSpecifics& typed_url_specifics); | 253 const sync_pb::TypedUrlSpecifics& typed_url_specifics); |
| 257 | 254 |
| 258 std::unique_ptr<base::DictionaryValue> UserEventSpecificsToValue( | 255 std::unique_ptr<base::DictionaryValue> UserEventSpecificsToValue( |
| 259 const sync_pb::UserEventSpecifics& user_event_specifics); | 256 const sync_pb::UserEventSpecifics& user_event_specifics); |
| 260 | 257 |
| 261 std::unique_ptr<base::DictionaryValue> WalletMaskedCreditCardToValue( | 258 std::unique_ptr<base::DictionaryValue> WalletMaskedCreditCardToValue( |
| 262 const sync_pb::WalletMaskedCreditCard& wallet_masked_card); | 259 const sync_pb::WalletMaskedCreditCard& wallet_masked_card); |
| 263 | 260 |
| 261 std::unique_ptr<base::DictionaryValue> WalletMetadataSpecificsToValue( | |
| 262 const sync_pb::WalletMetadataSpecifics& wallet_metadata_specifics); | |
| 263 | |
| 264 std::unique_ptr<base::DictionaryValue> WalletPostalAddressToValue( | 264 std::unique_ptr<base::DictionaryValue> WalletPostalAddressToValue( |
| 265 const sync_pb::WalletPostalAddress& wallet_postal_address); | 265 const sync_pb::WalletPostalAddress& wallet_postal_address); |
| 266 | 266 |
| 267 std::unique_ptr<base::DictionaryValue> WifiCredentialSpecificsToValue( | 267 std::unique_ptr<base::DictionaryValue> WifiCredentialSpecificsToValue( |
| 268 const sync_pb::WifiCredentialSpecifics& wifi_credential_specifics); | 268 const sync_pb::WifiCredentialSpecifics& wifi_credential_specifics); |
| 269 | 269 |
| 270 // Any present extensions are mapped to sub-dictionary values with the | |
| 271 // key equal to the extension name. | |
| 272 std::unique_ptr<base::DictionaryValue> EntitySpecificsToValue( | |
| 273 const sync_pb::EntitySpecifics& specifics); | |
| 274 | |
| 275 std::unique_ptr<base::DictionaryValue> SyncEntityToValue( | |
| 276 const sync_pb::SyncEntity& entity, | |
| 277 bool include_specifics); | |
| 278 | |
| 279 std::unique_ptr<base::DictionaryValue> ClientToServerMessageToValue( | 270 std::unique_ptr<base::DictionaryValue> ClientToServerMessageToValue( |
|
Patrick Noland
2017/05/12 23:21:27
I'm assuming these three(ClientToServerMessageToVa
skym
2017/05/15 15:01:36
In addition to alphabetizing, I wanted to make sur
Patrick Noland
2017/05/15 20:00:22
Alright, can you add a comment explaining this for
| |
| 280 const sync_pb::ClientToServerMessage& proto, | 271 const sync_pb::ClientToServerMessage& proto, |
| 281 bool include_specifics); | 272 bool include_specifics); |
| 282 | 273 |
| 283 std::unique_ptr<base::DictionaryValue> ClientToServerResponseToValue( | 274 std::unique_ptr<base::DictionaryValue> ClientToServerResponseToValue( |
| 284 const sync_pb::ClientToServerResponse& proto, | 275 const sync_pb::ClientToServerResponse& proto, |
| 285 bool include_specifics); | 276 bool include_specifics); |
| 286 | 277 |
| 287 std::unique_ptr<base::DictionaryValue> DatatypeAssociationStatsToValue( | 278 std::unique_ptr<base::DictionaryValue> SyncEntityToValue( |
| 288 const sync_pb::DatatypeAssociationStats& proto); | 279 const sync_pb::SyncEntity& entity, |
| 289 | 280 bool include_specifics); |
| 290 std::unique_ptr<base::DictionaryValue> DebugEventInfoToValue( | |
| 291 const sync_pb::DebugEventInfo& proto); | |
| 292 | |
| 293 std::unique_ptr<base::DictionaryValue> DebugInfoToValue( | |
| 294 const sync_pb::DebugInfo& proto); | |
| 295 | |
| 296 std::unique_ptr<base::DictionaryValue> SyncCycleCompletedEventInfoToValue( | |
| 297 const sync_pb::SyncCycleCompletedEventInfo& proto); | |
| 298 | |
| 299 std::unique_ptr<base::DictionaryValue> ClientConfigParamsToValue( | |
| 300 const sync_pb::ClientConfigParams& proto); | |
| 301 | |
| 302 std::unique_ptr<base::DictionaryValue> AttachmentIdProtoToValue( | |
| 303 const sync_pb::AttachmentIdProto& proto); | |
| 304 | |
| 305 std::unique_ptr<base::DictionaryValue> EntityMetadataToValue( | |
| 306 const sync_pb::EntityMetadata& metadata); | |
| 307 | 281 |
| 308 } // namespace syncer | 282 } // namespace syncer |
| 309 | 283 |
| 310 #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 284 #endif // COMPONENTS_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| OLD | NEW |