Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(702)

Side by Side Diff: sync/internal_api/public/util/experiments.h

Issue 875243003: Add sync experiment flag for wallet datatype. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <string> 8 #include <string>
9 9
10 #include "sync/internal_api/public/base/model_type.h" 10 #include "sync/internal_api/public/base/model_type.h"
11 11
12 namespace syncer { 12 namespace syncer {
13 13
14 const char kFaviconSyncTag[] = "favicon_sync"; 14 const char kFaviconSyncTag[] = "favicon_sync";
15 const char kPreCommitUpdateAvoidanceTag[] = "pre_commit_update_avoidance"; 15 const char kPreCommitUpdateAvoidanceTag[] = "pre_commit_update_avoidance";
16 const char kGCMChannelTag[] = "gcm_channel"; 16 const char kGCMChannelTag[] = "gcm_channel";
17 const char kEnhancedBookmarksTag[] = "enhanced_bookmarks"; 17 const char kEnhancedBookmarksTag[] = "enhanced_bookmarks";
18 const char kGCMInvalidationsTag[] = "gcm_invalidations"; 18 const char kGCMInvalidationsTag[] = "gcm_invalidations";
19 const char kWalletSyncTag[] = "wallet_sync";
19 20
20 // A structure to hold the enable status of experimental sync features. 21 // A structure to hold the enable status of experimental sync features.
21 struct Experiments { 22 struct Experiments {
22 enum GCMChannelState { 23 enum GCMChannelState {
23 UNSET, 24 UNSET,
24 SUPPRESSED, 25 SUPPRESSED,
25 ENABLED, 26 ENABLED,
26 }; 27 };
27 28
28 Experiments() 29 Experiments()
29 : favicon_sync_limit(200), 30 : favicon_sync_limit(200),
30 gcm_channel_state(UNSET), 31 gcm_channel_state(UNSET),
31 enhanced_bookmarks_enabled(false), 32 enhanced_bookmarks_enabled(false),
32 gcm_invalidations_enabled(true) // By default GCM channel is enabled. 33 gcm_invalidations_enabled(true), // By default GCM channel is enabled.
33 {} 34 wallet_sync_enabled(false) {}
34 35
35 bool Matches(const Experiments& rhs) { 36 bool Matches(const Experiments& rhs) {
36 return (favicon_sync_limit == rhs.favicon_sync_limit && 37 return (favicon_sync_limit == rhs.favicon_sync_limit &&
37 gcm_channel_state == rhs.gcm_channel_state && 38 gcm_channel_state == rhs.gcm_channel_state &&
38 enhanced_bookmarks_enabled == rhs.enhanced_bookmarks_enabled && 39 enhanced_bookmarks_enabled == rhs.enhanced_bookmarks_enabled &&
39 enhanced_bookmarks_ext_id == rhs.enhanced_bookmarks_ext_id && 40 enhanced_bookmarks_ext_id == rhs.enhanced_bookmarks_ext_id &&
40 gcm_invalidations_enabled == rhs.gcm_invalidations_enabled); 41 gcm_invalidations_enabled == rhs.gcm_invalidations_enabled &&
42 wallet_sync_enabled == rhs.wallet_sync_enabled);
41 } 43 }
42 44
43 // The number of favicons that a client is permitted to sync. 45 // The number of favicons that a client is permitted to sync.
44 int favicon_sync_limit; 46 int favicon_sync_limit;
45 47
46 // Enable state of the GCM channel. 48 // Enable state of the GCM channel.
47 GCMChannelState gcm_channel_state; 49 GCMChannelState gcm_channel_state;
48 50
49 // Enable the enhanced bookmarks sync datatype. 51 // Enable the enhanced bookmarks sync datatype.
50 bool enhanced_bookmarks_enabled; 52 bool enhanced_bookmarks_enabled;
51 53
52 // Enable invalidations over GCM channel. 54 // Enable invalidations over GCM channel.
53 bool gcm_invalidations_enabled; 55 bool gcm_invalidations_enabled;
54 56
55 // Enhanced bookmarks extension id. 57 // Enhanced bookmarks extension id.
56 std::string enhanced_bookmarks_ext_id; 58 std::string enhanced_bookmarks_ext_id;
59
60 // Enable the Wallet Autofill sync datatype.
61 bool wallet_sync_enabled;
57 }; 62 };
58 63
59 } // namespace syncer 64 } // namespace syncer
60 65
61 #endif // SYNC_UTIL_EXPERIMENTS_ 66 #endif // SYNC_UTIL_EXPERIMENTS_
OLDNEW
« no previous file with comments | « components/autofill/core/common/autofill_pref_names.cc ('k') | sync/internal_api/sync_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698