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

Unified Diff: components/gcm_driver/gcm_channel_status_syncer.h

Issue 653843003: [GCM] Start GCMChannelStatusSyncer when GCM is disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for GCM not reenabled after being disabled on the fly 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_channel_status_syncer.h
diff --git a/components/gcm_driver/gcm_channel_status_syncer.h b/components/gcm_driver/gcm_channel_status_syncer.h
index b4641afe5477b8e7c962dc58e0c56236ccaa9f9f..0b7ba3fff06c71c0c3c845820cb0d366d05347a3 100644
--- a/components/gcm_driver/gcm_channel_status_syncer.h
+++ b/components/gcm_driver/gcm_channel_status_syncer.h
@@ -59,7 +59,9 @@ class GCMChannelStatusSyncer {
private:
// Called when a request is completed.
- void OnRequestCompleted(bool enabled, int poll_interval_seconds);
+ void OnRequestCompleted(bool update_received,
+ bool enabled,
+ int poll_interval_seconds);
// Schedules next request to start after appropriate delay.
void ScheduleRequest();
@@ -80,10 +82,17 @@ class GCMChannelStatusSyncer {
scoped_refptr<net::URLRequestContextGetter> request_context_;
scoped_ptr<GCMChannelStatusRequest> request_;
+ bool started_;
bool gcm_enabled_;
int poll_interval_seconds_;
base::Time last_check_time_;
+ // If non-zero, |poll_interval_seconds_| is overriden by the command line
+ // options for testing purpose. Each time when the custom poll interval is
+ // used, this count is subtracted by one. When it reaches zero, the default
+ // poll interval will be used instead.
+ int custom_poll_interval_use_count_;
+
// The flag that indicates if the delay, including fuzzing variation and poll
// interval, is removed for testing purpose.
bool delay_removed_for_testing_;
« no previous file with comments | « components/gcm_driver/gcm_channel_status_request_unittest.cc ('k') | components/gcm_driver/gcm_channel_status_syncer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698