| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 7 #ifndef CHROME_BROWSER_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| 8 #define CHROME_BROWSER_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 8 #define CHROME_BROWSER_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| 9 #pragma once | 9 #pragma once |
| 10 | 10 |
| 11 namespace base { | 11 namespace base { |
| 12 class DictionaryValue; | 12 class DictionaryValue; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace sync_pb { | 15 namespace sync_pb { |
| 16 class AppNotificationSettings; |
| 16 class AppNotificationSpecifics; | 17 class AppNotificationSpecifics; |
| 17 class AppSpecifics; | 18 class AppSpecifics; |
| 18 class AutofillProfileSpecifics; | 19 class AutofillProfileSpecifics; |
| 19 class AutofillSpecifics; | 20 class AutofillSpecifics; |
| 20 class BookmarkSpecifics; | 21 class BookmarkSpecifics; |
| 21 class EncryptedData; | 22 class EncryptedData; |
| 22 class EntitySpecifics; | 23 class EntitySpecifics; |
| 23 class ExtensionSettingSpecifics; | 24 class ExtensionSettingSpecifics; |
| 24 class ExtensionSpecifics; | 25 class ExtensionSpecifics; |
| 25 class NigoriSpecifics; | 26 class NigoriSpecifics; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 47 | 48 |
| 48 namespace browser_sync { | 49 namespace browser_sync { |
| 49 | 50 |
| 50 // Ownership of all returned DictionaryValues are transferred to the | 51 // Ownership of all returned DictionaryValues are transferred to the |
| 51 // caller. | 52 // caller. |
| 52 | 53 |
| 53 // TODO(akalin): Perhaps extend this to decrypt? | 54 // TODO(akalin): Perhaps extend this to decrypt? |
| 54 base::DictionaryValue* EncryptedDataToValue( | 55 base::DictionaryValue* EncryptedDataToValue( |
| 55 const sync_pb::EncryptedData& encrypted_data); | 56 const sync_pb::EncryptedData& encrypted_data); |
| 56 | 57 |
| 58 // Sub-protocol of AppSpecifics. |
| 59 base::DictionaryValue* AppSettingsToValue( |
| 60 const sync_pb::AppNotificationSettings& app_notification_settings); |
| 61 |
| 57 // Sub-protocols of SessionSpecifics. | 62 // Sub-protocols of SessionSpecifics. |
| 58 | 63 |
| 59 base::DictionaryValue* SessionHeaderToValue( | 64 base::DictionaryValue* SessionHeaderToValue( |
| 60 const sync_pb::SessionHeader& session_header); | 65 const sync_pb::SessionHeader& session_header); |
| 61 | 66 |
| 62 base::DictionaryValue* SessionTabToValue( | 67 base::DictionaryValue* SessionTabToValue( |
| 63 const sync_pb::SessionTab& session_tab); | 68 const sync_pb::SessionTab& session_tab); |
| 64 | 69 |
| 65 base::DictionaryValue* SessionWindowToValue( | 70 base::DictionaryValue* SessionWindowToValue( |
| 66 const sync_pb::SessionWindow& session_window); | 71 const sync_pb::SessionWindow& session_window); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 const sync_pb::TypedUrlSpecifics& typed_url_specifics); | 123 const sync_pb::TypedUrlSpecifics& typed_url_specifics); |
| 119 | 124 |
| 120 // Any present extensions are mapped to sub-dictionary values with the | 125 // Any present extensions are mapped to sub-dictionary values with the |
| 121 // key equal to the extension name. | 126 // key equal to the extension name. |
| 122 base::DictionaryValue* EntitySpecificsToValue( | 127 base::DictionaryValue* EntitySpecificsToValue( |
| 123 const sync_pb::EntitySpecifics& entity_specifics); | 128 const sync_pb::EntitySpecifics& entity_specifics); |
| 124 | 129 |
| 125 } // namespace browser_sync | 130 } // namespace browser_sync |
| 126 | 131 |
| 127 #endif // CHROME_BROWSER_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ | 132 #endif // CHROME_BROWSER_SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ |
| OLD | NEW |