diff options
author | pavely@chromium.org <pavely@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 22:17:13 +0000 |
---|---|---|
committer | pavely@chromium.org <pavely@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 22:17:13 +0000 |
commit | ad3995ca5fe927c846f08e17044e14603d1a8b19 (patch) | |
tree | 28d89cd4ecbe42d00fbfe1f545634934479bb41e /sync/internal_api/public | |
parent | 2c9ba710edbc2cc3cd771524ef072a52fdb0d82b (diff) | |
download | chromium_src-ad3995ca5fe927c846f08e17044e14603d1a8b19.zip chromium_src-ad3995ca5fe927c846f08e17044e14603d1a8b19.tar.gz chromium_src-ad3995ca5fe927c846f08e17044e14603d1a8b19.tar.bz2 |
Control invalidations network channel from syncer experiment
- Created new experiment protobuf.
- ProfileSyncService writes value to prefs
- TiclInvalidationService registers for changes to both gcm
enabled and invalidations over GCM pref settings. When prefs
change it decides which channel to use and restarts
invalidator if needed.
BUG=325020
R=zea@chromium.org
Review URL: https://codereview.chromium.org/205333003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258689 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/public')
-rw-r--r-- | sync/internal_api/public/util/experiments.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sync/internal_api/public/util/experiments.h b/sync/internal_api/public/util/experiments.h index 18a0887..9063cbb 100644 --- a/sync/internal_api/public/util/experiments.h +++ b/sync/internal_api/public/util/experiments.h @@ -15,6 +15,7 @@ const char kFaviconSyncTag[] = "favicon_sync"; const char kPreCommitUpdateAvoidanceTag[] = "pre_commit_update_avoidance"; const char kGCMChannelTag[] = "gcm_channel"; const char kEnhancedBookmarksTag[] = "enhanced_bookmarks"; +const char kGCMInvalidationsTag[] = "gcm_invalidations"; // A structure to hold the enable status of experimental sync features. struct Experiments { @@ -27,13 +28,15 @@ struct Experiments { Experiments() : favicon_sync_limit(200), gcm_channel_state(UNSET), - enhanced_bookmarks_enabled(false) {} + enhanced_bookmarks_enabled(false), + gcm_invalidations_enabled(false) {} bool Matches(const Experiments& rhs) { return (favicon_sync_limit == rhs.favicon_sync_limit && gcm_channel_state == rhs.gcm_channel_state && enhanced_bookmarks_enabled == rhs.enhanced_bookmarks_enabled && - enhanced_bookmarks_ext_id == rhs.enhanced_bookmarks_ext_id); + enhanced_bookmarks_ext_id == rhs.enhanced_bookmarks_ext_id && + gcm_invalidations_enabled == rhs.gcm_invalidations_enabled); } // The number of favicons that a client is permitted to sync. @@ -45,6 +48,9 @@ struct Experiments { // Enable the enhanced bookmarks sync datatype. bool enhanced_bookmarks_enabled; + // Enable invalidations over GCM channel. + bool gcm_invalidations_enabled; + // Enhanced bookmarks extension id. std::string enhanced_bookmarks_ext_id; }; |