experiments.h revision 2a99a7e74a7f215066514fe81d2bfa6639d9eddd
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 3// found in the LICENSE file. 4 5#ifndef SYNC_UTIL_EXPERIMENTS_ 6#define SYNC_UTIL_EXPERIMENTS_ 7 8#include "sync/internal_api/public/base/model_type.h" 9 10namespace syncer { 11 12const char kKeystoreEncryptionTag[] = "keystore_encryption"; 13const char kKeystoreEncryptionFlag[] = "sync-keystore-encryption"; 14const char kAutofillCullingTag[] = "autofill_culling"; 15const char kFullHistorySyncTag[] = "history_delete_directives"; 16const char kFullHistorySyncFlag[] = "full-history-sync"; 17const char kFaviconSyncTag[] = "favicon_sync"; 18const char kFaviconSyncFlag[] = "enable-sync-favicons"; 19 20// A structure to hold the enable status of experimental sync features. 21struct Experiments { 22 Experiments() : keystore_encryption(false), 23 autofill_culling(false), 24 full_history_sync(false), 25 favicon_sync(false) {} 26 27 bool Matches(const Experiments& rhs) { 28 return (keystore_encryption == rhs.keystore_encryption && 29 autofill_culling == rhs.autofill_culling && 30 full_history_sync == rhs.full_history_sync && 31 favicon_sync == rhs.favicon_sync); 32 } 33 34 // Enable keystore encryption logic and the new encryption UI. 35 bool keystore_encryption; 36 37 // Enable deletion of expired autofill entries (if autofill sync is enabled). 38 bool autofill_culling; 39 40 // Enable full history sync (and history delete directives) for this client. 41 bool full_history_sync; 42 43 // Enable the favicons sync datatypes (favicon images and favicon tracking). 44 bool favicon_sync; 45}; 46 47} // namespace syncer 48 49#endif // SYNC_UTIL_EXPERIMENTS_ 50