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

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 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_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..12cf69c0b91f896da633a53c589a8206315c14f8 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();
@@ -84,6 +86,12 @@ class GCMChannelStatusSyncer {
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_;

Powered by Google App Engine
This is Rietveld 408576698