diff options
author | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-08 00:54:42 +0000 |
---|---|---|
committer | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-08 00:54:42 +0000 |
commit | 3106ea3424d35c8ac6b80b26b7b783f4e250cbb0 (patch) | |
tree | 0e14b939a9c1406f81e0f586a38e257e2501db83 /sync/internal_api/public/util | |
parent | c0e0515aae8dbf83e5ed859a0ac85d80c34ae627 (diff) | |
download | chromium_src-3106ea3424d35c8ac6b80b26b7b783f4e250cbb0.zip chromium_src-3106ea3424d35c8ac6b80b26b7b783f4e250cbb0.tar.gz chromium_src-3106ea3424d35c8ac6b80b26b7b783f4e250cbb0.tar.bz2 |
[GCM] Add experiment and startup logic for partial rollout
The experiment controls whether the GCMProfileService should be suppressed
or force created at sync startup time. If no experiment is present, the default
is for Canary/Dev clients to be able to enable the GCMProfileService lazily,
and other clients to be unable to create it at all.
BUG=284553
Review URL: https://codereview.chromium.org/152633006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249871 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/public/util')
-rw-r--r-- | sync/internal_api/public/util/experiments.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sync/internal_api/public/util/experiments.h b/sync/internal_api/public/util/experiments.h index 144687d..0be2dd9 100644 --- a/sync/internal_api/public/util/experiments.h +++ b/sync/internal_api/public/util/experiments.h @@ -12,15 +12,24 @@ namespace syncer { const char kAutofillCullingTag[] = "autofill_culling"; const char kFaviconSyncTag[] = "favicon_sync"; const char kPreCommitUpdateAvoidanceTag[] = "pre_commit_update_avoidance"; +const char kGCMChannelTag[] = "gcm_channel"; // A structure to hold the enable status of experimental sync features. struct Experiments { + enum GCMChannelState { + UNSET, + SUPPRESSED, + ENABLED, + }; + Experiments() : autofill_culling(false), - favicon_sync_limit(200) {} + favicon_sync_limit(200), + gcm_channel_state(UNSET) {} bool Matches(const Experiments& rhs) { return (autofill_culling == rhs.autofill_culling && - favicon_sync_limit == rhs.favicon_sync_limit); + favicon_sync_limit == rhs.favicon_sync_limit && + gcm_channel_state == rhs.gcm_channel_state); } // Enable deletion of expired autofill entries (if autofill sync is enabled). @@ -28,6 +37,9 @@ struct Experiments { // The number of favicons that a client is permitted to sync. int favicon_sync_limit; + + // Enable state of the GCM channel. + GCMChannelState gcm_channel_state; }; } // namespace syncer |