OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 CHROME_BROWSER_CHROMEOS_POLICY_HEARTBEAT_SCHEDULER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_HEARTBEAT_SCHEDULER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_HEARTBEAT_SCHEDULER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_HEARTBEAT_SCHEDULER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 12 matching lines...) Expand all Loading... |
23 namespace base { | 23 namespace base { |
24 class SequencedTaskRunner; | 24 class SequencedTaskRunner; |
25 } | 25 } |
26 | 26 |
27 namespace gcm { | 27 namespace gcm { |
28 class GCMDriver; | 28 class GCMDriver; |
29 } | 29 } |
30 | 30 |
31 namespace policy { | 31 namespace policy { |
32 | 32 |
33 class InstallAttributes; | |
34 class HeartbeatRegistrationHelper; | 33 class HeartbeatRegistrationHelper; |
35 | 34 |
36 // Class responsible for periodically sending heartbeats to the policy service | 35 // Class responsible for periodically sending heartbeats to the policy service |
37 // for monitoring device connectivity. | 36 // for monitoring device connectivity. |
38 class HeartbeatScheduler : public gcm::GCMAppHandler, | 37 class HeartbeatScheduler : public gcm::GCMAppHandler, |
39 gcm::GCMConnectionObserver { | 38 gcm::GCMConnectionObserver { |
40 public: | 39 public: |
41 // Default interval for how often we send up a heartbeat. | 40 // Default interval for how often we send up a heartbeat. |
42 static const int64_t kDefaultHeartbeatIntervalMs; | 41 static const int64_t kDefaultHeartbeatIntervalMs; |
43 | 42 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 // Note: This should remain the last member so it'll be destroyed and | 154 // Note: This should remain the last member so it'll be destroyed and |
156 // invalidate the weak pointers before any other members are destroyed. | 155 // invalidate the weak pointers before any other members are destroyed. |
157 base::WeakPtrFactory<HeartbeatScheduler> weak_factory_; | 156 base::WeakPtrFactory<HeartbeatScheduler> weak_factory_; |
158 | 157 |
159 DISALLOW_COPY_AND_ASSIGN(HeartbeatScheduler); | 158 DISALLOW_COPY_AND_ASSIGN(HeartbeatScheduler); |
160 }; | 159 }; |
161 | 160 |
162 } // namespace policy | 161 } // namespace policy |
163 | 162 |
164 #endif // CHROME_BROWSER_CHROMEOS_POLICY_HEARTBEAT_SCHEDULER_H_ | 163 #endif // CHROME_BROWSER_CHROMEOS_POLICY_HEARTBEAT_SCHEDULER_H_ |
OLD | NEW |