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

Unified Diff: components/gcm_driver/gcm_driver_desktop.cc

Issue 653843003: [GCM] Start GCMChannelStatusSyncer when GCM is disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix to poll interval switch Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: components/gcm_driver/gcm_driver_desktop.cc
diff --git a/components/gcm_driver/gcm_driver_desktop.cc b/components/gcm_driver/gcm_driver_desktop.cc
index ca1f45f8ffd3495d6cc1eb15002def2288901268..ee18275492346f0be84bad19d2c3e27e0232c2ca 100644
--- a/components/gcm_driver/gcm_driver_desktop.cc
+++ b/components/gcm_driver/gcm_driver_desktop.cc
@@ -641,8 +641,14 @@ GCMClient::Result GCMDriverDesktop::EnsureStarted() {
if (gcm_started_)
return GCMClient::SUCCESS;
- if (!gcm_enabled_)
+ if (!gcm_enabled_) {
+ // Poll for channel status in order to find out when it is re-enabled when
+ // GCM is currently disabled.
+ if (GCMDriver::IsAllowedForAllUsers())
+ gcm_channel_status_syncer_->EnsureStarted();
+
return GCMClient::GCM_DISABLED;
+ }
// Have any app requested the service?
if (app_handlers().empty())

Powered by Google App Engine
This is Rietveld 408576698