• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
10 namespace syncer {
11 
12 const char kAutofillCullingTag[] = "autofill_culling";
13 const char kFaviconSyncTag[] = "favicon_sync";
14 const char kPreCommitUpdateAvoidanceTag[] = "pre_commit_update_avoidance";
15 
16 // A structure to hold the enable status of experimental sync features.
17 struct Experiments {
ExperimentsExperiments18   Experiments() : autofill_culling(false),
19                   favicon_sync_limit(200) {}
20 
MatchesExperiments21   bool Matches(const Experiments& rhs) {
22     return (autofill_culling == rhs.autofill_culling &&
23             favicon_sync_limit == rhs.favicon_sync_limit);
24   }
25 
26   // Enable deletion of expired autofill entries (if autofill sync is enabled).
27   bool autofill_culling;
28 
29   // The number of favicons that a client is permitted to sync.
30   int favicon_sync_limit;
31 };
32 
33 }  // namespace syncer
34 
35 #endif  // SYNC_UTIL_EXPERIMENTS_
36