| 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" |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 class DictionaryValue; | 13 class DictionaryValue; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace sync_pb { | 16 namespace sync_pb { |
| 17 class AppListSpecifics; | 17 class AppListSpecifics; |
| 18 class AppNotification; | 18 class AppNotification; |
| 19 class AppNotificationSettings; | 19 class AppNotificationSettings; |
| 20 class AppSettingSpecifics; | 20 class AppSettingSpecifics; |
| 21 class AppSpecifics; | 21 class AppSpecifics; |
| 22 class ArticleSpecifics; | 22 class ArticleSpecifics; |
| 23 class AttachmentIdProto; | 23 class AttachmentIdProto; |
| 24 class AutofillProfileSpecifics; | 24 class AutofillProfileSpecifics; |
| 25 class AutofillSpecifics; | 25 class AutofillSpecifics; |
| 26 class BookmarkSpecifics; | 26 class BookmarkSpecifics; |
| 27 class ClientConfigParams; | 27 class ClientConfigParams; |
| 28 class ClientToServerMessage; | 28 class ClientToServerMessage; |
| 29 class ClientToServerResponse; | 29 class ClientToServerResponse; |
| 30 class CoalescedSyncedNotification; | |
| 31 class CollapsedInfo; | 30 class CollapsedInfo; |
| 32 class DatatypeAssociationStats; | 31 class DatatypeAssociationStats; |
| 33 class DebugEventInfo; | 32 class DebugEventInfo; |
| 34 class DebugInfo; | 33 class DebugInfo; |
| 35 class DeviceInfoSpecifics; | 34 class DeviceInfoSpecifics; |
| 36 class DeviceInformation; | 35 class DeviceInformation; |
| 37 class DictionarySpecifics; | 36 class DictionarySpecifics; |
| 38 class EncryptedData; | 37 class EncryptedData; |
| 39 class EntitySpecifics; | 38 class EntitySpecifics; |
| 40 class EverythingDirective; | 39 class EverythingDirective; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 57 class PreferenceSpecifics; | 56 class PreferenceSpecifics; |
| 58 class PriorityPreferenceSpecifics; | 57 class PriorityPreferenceSpecifics; |
| 59 class SearchEngineSpecifics; | 58 class SearchEngineSpecifics; |
| 60 class SessionHeader; | 59 class SessionHeader; |
| 61 class SessionSpecifics; | 60 class SessionSpecifics; |
| 62 class SessionTab; | 61 class SessionTab; |
| 63 class SessionWindow; | 62 class SessionWindow; |
| 64 class SimpleCollapsedLayout; | 63 class SimpleCollapsedLayout; |
| 65 class SyncCycleCompletedEventInfo; | 64 class SyncCycleCompletedEventInfo; |
| 66 class SyncEntity; | 65 class SyncEntity; |
| 67 class SyncedNotification; | |
| 68 class SyncedNotificationAction; | |
| 69 class SyncedNotificationAppInfo; | |
| 70 class SyncedNotificationAppInfoSpecifics; | 66 class SyncedNotificationAppInfoSpecifics; |
| 71 class SyncedNotificationDestination; | |
| 72 class SyncedNotificationImage; | |
| 73 class SyncedNotificationProfileImage; | |
| 74 class SyncedNotificationRenderInfo; | |
| 75 class SyncedNotificationSpecifics; | 67 class SyncedNotificationSpecifics; |
| 76 class TabNavigation; | 68 class TabNavigation; |
| 77 class Target; | 69 class Target; |
| 78 class ThemeSpecifics; | 70 class ThemeSpecifics; |
| 79 class TimeRangeDirective; | 71 class TimeRangeDirective; |
| 80 class TypedUrlSpecifics; | 72 class TypedUrlSpecifics; |
| 81 class WifiCredentialSpecifics; | 73 class WifiCredentialSpecifics; |
| 82 } // namespace sync_pb | 74 } // namespace sync_pb |
| 83 | 75 |
| 84 // Utility functions to convert sync protocol buffers to dictionaries. | 76 // Utility functions to convert sync protocol buffers to dictionaries. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 const sync_pb::GlobalIdDirective& global_id_directive); | 132 const sync_pb::GlobalIdDirective& global_id_directive); |
| 141 | 133 |
| 142 base::DictionaryValue* TimeRangeDirectiveToValue( | 134 base::DictionaryValue* TimeRangeDirectiveToValue( |
| 143 const sync_pb::TimeRangeDirective& time_range_directive); | 135 const sync_pb::TimeRangeDirective& time_range_directive); |
| 144 | 136 |
| 145 // Sub-protocol of Experiments. | 137 // Sub-protocol of Experiments. |
| 146 | 138 |
| 147 base::DictionaryValue* KeystoreEncryptionToValue( | 139 base::DictionaryValue* KeystoreEncryptionToValue( |
| 148 const sync_pb::KeystoreEncryptionFlagsSpecifics& proto); | 140 const sync_pb::KeystoreEncryptionFlagsSpecifics& proto); |
| 149 | 141 |
| 150 // Sub protocols of SyncedNotifications. | |
| 151 | |
| 152 base::DictionaryValue* SimpleCollapsedLayoutToValue( | |
| 153 const sync_pb::SimpleCollapsedLayout& proto); | |
| 154 | |
| 155 base::DictionaryValue* CollapsedInfoToValue( | |
| 156 const sync_pb::CollapsedInfo& proto); | |
| 157 | |
| 158 base::DictionaryValue* RenderInfoToValue( | |
| 159 const sync_pb::SyncedNotificationRenderInfo& proto); | |
| 160 | |
| 161 base::DictionaryValue* CoalescedNotificationToValue( | |
| 162 const sync_pb::CoalescedSyncedNotification& proto); | |
| 163 | |
| 164 base::DictionaryValue* SyncedNotificationActionToValue( | |
| 165 const sync_pb::SyncedNotificationAction& action); | |
| 166 | |
| 167 base::DictionaryValue* SyncedNotificationDestinationToValue( | |
| 168 const sync_pb::SyncedNotificationDestination& destination); | |
| 169 | |
| 170 base::DictionaryValue* SyncedNotificationToValue( | |
| 171 const sync_pb::SyncedNotification& notification); | |
| 172 | |
| 173 SYNC_EXPORT_PRIVATE base::DictionaryValue* SessionSpecificsToValue( | 142 SYNC_EXPORT_PRIVATE base::DictionaryValue* SessionSpecificsToValue( |
| 174 const sync_pb::SessionSpecifics& session_specifics); | 143 const sync_pb::SessionSpecifics& session_specifics); |
| 175 | 144 |
| 176 SYNC_EXPORT_PRIVATE base::DictionaryValue* SyncedNotificationImageToValue( | |
| 177 const sync_pb::SyncedNotificationImage& image); | |
| 178 | |
| 179 SYNC_EXPORT_PRIVATE base::DictionaryValue* | |
| 180 SyncedNotificationProfileImageToValue( | |
| 181 const sync_pb::SyncedNotificationProfileImage& image); | |
| 182 | |
| 183 SYNC_EXPORT_PRIVATE base::DictionaryValue* TargetToValue( | |
| 184 const sync_pb::Target& target); | |
| 185 | |
| 186 // Main *SpecificsToValue functions. | 145 // Main *SpecificsToValue functions. |
| 187 | 146 |
| 188 SYNC_EXPORT_PRIVATE base::DictionaryValue* AppNotificationToValue( | 147 SYNC_EXPORT_PRIVATE base::DictionaryValue* AppNotificationToValue( |
| 189 const sync_pb::AppNotification& app_notification_specifics); | 148 const sync_pb::AppNotification& app_notification_specifics); |
| 190 | 149 |
| 191 base::DictionaryValue* AppSettingSpecificsToValue( | 150 base::DictionaryValue* AppSettingSpecificsToValue( |
| 192 const sync_pb::AppSettingSpecifics& app_setting_specifics); | 151 const sync_pb::AppSettingSpecifics& app_setting_specifics); |
| 193 | 152 |
| 194 SYNC_EXPORT_PRIVATE base::DictionaryValue* AppSpecificsToValue( | 153 SYNC_EXPORT_PRIVATE base::DictionaryValue* AppSpecificsToValue( |
| 195 const sync_pb::AppSpecifics& app_specifics); | 154 const sync_pb::AppSpecifics& app_specifics); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 268 |
| 310 base::DictionaryValue* ClientConfigParamsToValue( | 269 base::DictionaryValue* ClientConfigParamsToValue( |
| 311 const sync_pb::ClientConfigParams& proto); | 270 const sync_pb::ClientConfigParams& proto); |
| 312 | 271 |
| 313 SYNC_EXPORT_PRIVATE base::DictionaryValue* AttachmentIdProtoToValue( | 272 SYNC_EXPORT_PRIVATE base::DictionaryValue* AttachmentIdProtoToValue( |
| 314 const sync_pb::AttachmentIdProto& proto); | 273 const sync_pb::AttachmentIdProto& proto); |
| 315 | 274 |
| 316 } // namespace syncer | 275 } // namespace syncer |
| 317 | 276 |
| 318 #endif // SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 277 #endif // SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| OLD | NEW |