Commit 39c24c85 authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Sync cleanup: Remove Experiments::gcm_invalidations_enabled

It's always true.

Bug: 904782
Change-Id: I6cb979f5e168a33d100b3dfda00257f5d72438b5
Reviewed-on: https://chromium-review.googlesource.com/c/1341533Reviewed-by: default avatarTatiana Gornak <melandory@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609242}
parent cfe37a2b
...@@ -1060,8 +1060,7 @@ void ProfileSyncService::OnExperimentsChanged( ...@@ -1060,8 +1060,7 @@ void ProfileSyncService::OnExperimentsChanged(
current_experiments_ = experiments; current_experiments_ = experiments;
sync_client_->GetPrefService()->SetBoolean( sync_client_->GetPrefService()->SetBoolean(
invalidation::prefs::kInvalidationServiceUseGCMChannel, invalidation::prefs::kInvalidationServiceUseGCMChannel, true);
experiments.gcm_invalidations_enabled);
} }
void ProfileSyncService::OnConnectionStatusChange( void ProfileSyncService::OnConnectionStatusChange(
......
...@@ -19,7 +19,8 @@ const char kInvalidatorInvalidationState[] = "invalidator.invalidation_state"; ...@@ -19,7 +19,8 @@ const char kInvalidatorInvalidationState[] = "invalidator.invalidation_state";
const char kInvalidatorSavedInvalidations[] = "invalidator.saved_invalidations"; const char kInvalidatorSavedInvalidations[] = "invalidator.saved_invalidations";
// Boolean indicating that TiclInvalidationService should use GCM channel. // Boolean indicating that TiclInvalidationService should use GCM channel.
// False or lack of settings means XMPPPushClient channel. // False means XMPPPushClient channel.
// TODO(crbug.com/904782): Get rid of this; it's always true.
const char kInvalidationServiceUseGCMChannel[] = const char kInvalidationServiceUseGCMChannel[] =
"invalidation_service.use_gcm_channel"; "invalidation_service.use_gcm_channel";
......
...@@ -13,25 +13,17 @@ namespace syncer { ...@@ -13,25 +13,17 @@ namespace syncer {
const char kFaviconSyncTag[] = "favicon_sync"; const char kFaviconSyncTag[] = "favicon_sync";
const char kPreCommitUpdateAvoidanceTag[] = "pre_commit_update_avoidance"; const char kPreCommitUpdateAvoidanceTag[] = "pre_commit_update_avoidance";
const char kGCMInvalidationsTag[] = "gcm_invalidations";
// A structure to hold the enable status of experimental sync features. // A structure to hold the enable status of experimental sync features.
struct Experiments { struct Experiments {
Experiments() Experiments() : favicon_sync_limit(200) {}
: favicon_sync_limit(200),
// By default GCM channel is enabled:
gcm_invalidations_enabled(true) {}
bool Matches(const Experiments& rhs) { bool Matches(const Experiments& rhs) {
return (favicon_sync_limit == rhs.favicon_sync_limit && return favicon_sync_limit == rhs.favicon_sync_limit;
gcm_invalidations_enabled == rhs.gcm_invalidations_enabled);
} }
// The number of favicons that a client is permitted to sync. // The number of favicons that a client is permitted to sync.
int favicon_sync_limit; int favicon_sync_limit;
// Enable invalidations over GCM channel.
bool gcm_invalidations_enabled;
}; };
} // namespace syncer } // namespace syncer
......
...@@ -925,17 +925,6 @@ bool SyncManagerImpl::ReceivedExperiment(Experiments* experiments) { ...@@ -925,17 +925,6 @@ bool SyncManagerImpl::ReceivedExperiment(Experiments* experiments) {
// know about this. // know about this.
} }
ReadNode gcm_invalidations_node(&trans);
if (gcm_invalidations_node.InitByClientTagLookup(
EXPERIMENTS, kGCMInvalidationsTag) == BaseNode::INIT_OK) {
const sync_pb::GcmInvalidationsFlags& gcm_invalidations =
gcm_invalidations_node.GetExperimentsSpecifics().gcm_invalidations();
if (gcm_invalidations.has_enabled()) {
experiments->gcm_invalidations_enabled = gcm_invalidations.enabled();
found_experiment = true;
}
}
return found_experiment; return found_experiment;
} }
......
...@@ -74,6 +74,7 @@ message ExperimentsSpecifics { ...@@ -74,6 +74,7 @@ message ExperimentsSpecifics {
optional GcmChannelFlags gcm_channel = 6; optional GcmChannelFlags gcm_channel = 6;
// No longer used as of M43. // No longer used as of M43.
optional EnhancedBookmarksFlags obsolete_enhanced_bookmarks = 7; optional EnhancedBookmarksFlags obsolete_enhanced_bookmarks = 7;
// No longer used as of M72.
optional GcmInvalidationsFlags gcm_invalidations = 8; optional GcmInvalidationsFlags gcm_invalidations = 8;
// No longer used as of M51. // No longer used as of M51.
optional WalletSyncFlags obsolete_wallet_sync = 9; optional WalletSyncFlags obsolete_wallet_sync = 9;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment