| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 SYNC_UTIL_EXPERIMENTS_ | 5 #ifndef SYNC_UTIL_EXPERIMENTS_ |
| 6 #define SYNC_UTIL_EXPERIMENTS_ | 6 #define SYNC_UTIL_EXPERIMENTS_ |
| 7 | 7 |
| 8 #include "sync/internal_api/public/base/model_type.h" | 8 #include "sync/internal_api/public/base/model_type.h" |
| 9 | 9 |
| 10 namespace syncer { | 10 namespace syncer { |
| 11 | 11 |
| 12 const char kKeystoreEncryptionTag[] = "keystore_encryption"; | 12 const char kKeystoreEncryptionTag[] = "keystore_encryption"; |
| 13 const char kKeystoreEncryptionFlag[] = "sync-keystore-encryption"; | 13 const char kKeystoreEncryptionFlag[] = "sync-keystore-encryption"; |
| 14 const char kAutofillCullingTag[] = "autofill_culling"; | 14 const char kAutofillCullingTag[] = "autofill_culling"; |
| 15 const char kFullHistorySyncTag[] = "history_delete_directives"; | 15 const char kFullHistorySyncTag[] = "history_delete_directives"; |
| 16 const char kFullHistorySyncFlag[] = "full-history-sync"; | 16 const char kFullHistorySyncFlag[] = "full-history-sync"; |
| 17 const char kFaviconSyncTag[] = "favicon_sync"; |
| 18 const char kFaviconSyncFlag[] = "enable-sync-favicons"; |
| 17 | 19 |
| 18 // A structure to hold the enable status of experimental sync features. | 20 // A structure to hold the enable status of experimental sync features. |
| 19 struct Experiments { | 21 struct Experiments { |
| 20 Experiments() : sync_tab_favicons(false), | 22 Experiments() : keystore_encryption(false), |
| 21 keystore_encryption(false), | |
| 22 autofill_culling(false), | 23 autofill_culling(false), |
| 23 full_history_sync(false) {} | 24 full_history_sync(false), |
| 25 favicon_sync(false) {} |
| 24 | 26 |
| 25 bool Matches(const Experiments& rhs) { | 27 bool Matches(const Experiments& rhs) { |
| 26 return (sync_tab_favicons == rhs.sync_tab_favicons && | 28 return (keystore_encryption == rhs.keystore_encryption && |
| 27 keystore_encryption == rhs.keystore_encryption && | |
| 28 autofill_culling == rhs.autofill_culling && | 29 autofill_culling == rhs.autofill_culling && |
| 29 full_history_sync == rhs.full_history_sync); | 30 full_history_sync == rhs.full_history_sync && |
| 31 favicon_sync == rhs.favicon_sync); |
| 30 } | 32 } |
| 31 | 33 |
| 32 // Enable syncing of favicons within tab sync (only has an effect if tab sync | |
| 33 // is already enabled). This takes effect on the next restart. | |
| 34 bool sync_tab_favicons; | |
| 35 | |
| 36 // Enable keystore encryption logic and the new encryption UI. | 34 // Enable keystore encryption logic and the new encryption UI. |
| 37 bool keystore_encryption; | 35 bool keystore_encryption; |
| 38 | 36 |
| 39 // Enable deletion of expired autofill entries (if autofill sync is enabled). | 37 // Enable deletion of expired autofill entries (if autofill sync is enabled). |
| 40 bool autofill_culling; | 38 bool autofill_culling; |
| 41 | 39 |
| 42 // Enable full history sync (and history delete directives) for this client. | 40 // Enable full history sync (and history delete directives) for this client. |
| 43 bool full_history_sync; | 41 bool full_history_sync; |
| 42 |
| 43 // Enable the favicons sync datatypes (favicon images and favicon tracking). |
| 44 bool favicon_sync; |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 } // namespace syncer | 47 } // namespace syncer |
| 47 | 48 |
| 48 #endif // SYNC_UTIL_EXPERIMENTS_ | 49 #endif // SYNC_UTIL_EXPERIMENTS_ |
| OLD | NEW |