experiments.h revision c2e0dbddbe15c98d52c4786dac06cb8952a8ae6d
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 kFaviconSyncTag[] = "favicon_sync"; 16const char kFaviconSyncFlag[] = "enable-sync-favicons"; 17 18// A structure to hold the enable status of experimental sync features. 19struct Experiments { 20 Experiments() : keystore_encryption(false), 21 autofill_culling(false), 22 favicon_sync(false), 23 favicon_sync_limit(200) {} 24 25 bool Matches(const Experiments& rhs) { 26 return (keystore_encryption == rhs.keystore_encryption && 27 autofill_culling == rhs.autofill_culling && 28 favicon_sync == rhs.favicon_sync && 29 favicon_sync_limit == rhs.favicon_sync_limit); 30 } 31 32 // Enable keystore encryption logic and the new encryption UI. 33 bool keystore_encryption; 34 35 // Enable deletion of expired autofill entries (if autofill sync is enabled). 36 bool autofill_culling; 37 38 // Enable the favicons sync datatypes (favicon images and favicon tracking). 39 bool favicon_sync; 40 41 // The number of favicons that a client is permitted to sync. 42 int favicon_sync_limit; 43}; 44 45} // namespace syncer 46 47#endif // SYNC_UTIL_EXPERIMENTS_ 48