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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_GCM_DRIVER_GCM_CHANNEL_STATUS_SYNCER_H_ 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_CHANNEL_STATUS_SYNCER_H_
6 #define COMPONENTS_GCM_DRIVER_GCM_CHANNEL_STATUS_SYNCER_H_ 6 #define COMPONENTS_GCM_DRIVER_GCM_CHANNEL_STATUS_SYNCER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 void set_delay_removed_for_testing(bool delay_removed) { 52 void set_delay_removed_for_testing(bool delay_removed) {
53 delay_removed_for_testing_ = delay_removed; 53 delay_removed_for_testing_ = delay_removed;
54 } 54 }
55 base::TimeDelta current_request_delay_interval() const { 55 base::TimeDelta current_request_delay_interval() const {
56 return current_request_delay_interval_; 56 return current_request_delay_interval_;
57 } 57 }
58 static int first_time_delay_seconds(); 58 static int first_time_delay_seconds();
59 59
60 private: 60 private:
61 // Called when a request is completed. 61 // Called when a request is completed.
62 void OnRequestCompleted(bool enabled, int poll_interval_seconds); 62 void OnRequestCompleted(bool update_received,
63 bool enabled,
64 int poll_interval_seconds);
63 65
64 // Schedules next request to start after appropriate delay. 66 // Schedules next request to start after appropriate delay.
65 void ScheduleRequest(); 67 void ScheduleRequest();
66 68
67 // Creates and starts a request immediately. 69 // Creates and starts a request immediately.
68 void StartRequest(); 70 void StartRequest();
69 71
70 // Computes and returns a delay with the fuzzing variation added if needed, 72 // Computes and returns a delay with the fuzzing variation added if needed,
71 // after which the request could start. 73 // after which the request could start.
72 base::TimeDelta GetRequestDelayInterval() const; 74 base::TimeDelta GetRequestDelayInterval() const;
(...skipping 20 matching lines...) Expand all
93 95
94 // Used to pass a weak pointer to a task. 96 // Used to pass a weak pointer to a task.
95 base::WeakPtrFactory<GCMChannelStatusSyncer> weak_ptr_factory_; 97 base::WeakPtrFactory<GCMChannelStatusSyncer> weak_ptr_factory_;
96 98
97 DISALLOW_COPY_AND_ASSIGN(GCMChannelStatusSyncer); 99 DISALLOW_COPY_AND_ASSIGN(GCMChannelStatusSyncer);
98 }; 100 };
99 101
100 } // namespace gcm 102 } // namespace gcm
101 103
102 #endif // COMPONENTS_GCM_DRIVER_GCM_CHANNEL_STATUS_SYNCER_H_ 104 #endif // COMPONENTS_GCM_DRIVER_GCM_CHANNEL_STATUS_SYNCER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698