Chromium Code Reviews| Index: sync/syncable/nigori_util.cc |
| diff --git a/sync/syncable/nigori_util.cc b/sync/syncable/nigori_util.cc |
| index 32a5fcfcbf4373e873bbb1976d27f23558b4f895..09e220d0f3171fb1a485a205ed313a76cf687187 100644 |
| --- a/sync/syncable/nigori_util.cc |
| +++ b/sync/syncable/nigori_util.cc |
| @@ -246,5 +246,33 @@ bool UpdateEntryWithEncryption( |
| return true; |
| } |
| +void UpdateNigoriFromEncryptedTypes(ModelTypeSet encrypted_types, |
| + bool encrypt_everything, |
| + sync_pb::NigoriSpecifics* nigori) { |
| + nigori->set_encrypt_everything(encrypt_everything); |
| + nigori->set_encrypt_bookmarks( |
| + encrypted_types.Has(BOOKMARKS)); |
| + nigori->set_encrypt_preferences( |
| + encrypted_types.Has(PREFERENCES)); |
| + nigori->set_encrypt_autofill_profile( |
| + encrypted_types.Has(AUTOFILL_PROFILE)); |
| + nigori->set_encrypt_autofill(encrypted_types.Has(AUTOFILL)); |
| + nigori->set_encrypt_themes(encrypted_types.Has(THEMES)); |
| + nigori->set_encrypt_typed_urls( |
| + encrypted_types.Has(TYPED_URLS)); |
| + nigori->set_encrypt_extension_settings( |
| + encrypted_types.Has(EXTENSION_SETTINGS)); |
| + nigori->set_encrypt_extensions( |
| + encrypted_types.Has(EXTENSIONS)); |
| + nigori->set_encrypt_search_engines( |
| + encrypted_types.Has(SEARCH_ENGINES)); |
| + nigori->set_encrypt_sessions(encrypted_types.Has(SESSIONS)); |
| + nigori->set_encrypt_app_settings( |
| + encrypted_types.Has(APP_SETTINGS)); |
| + nigori->set_encrypt_apps(encrypted_types.Has(APPS)); |
| + nigori->set_encrypt_app_notifications( |
| + encrypted_types.Has(APP_NOTIFICATIONS)); |
|
tim (not reviewing)
2012/08/14 02:32:20
Should there be a compile-assert here on the numbe
Nicolas Zea
2012/08/14 23:24:51
The nigori handler version will eventually call in
|
| +} |
| + |
| } // namespace syncable |
| } // namespace syncer |