| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_VARIATIONS_VARIATIONS_REQUEST_SCHEDULER_H_ | 5 #ifndef COMPONENTS_VARIATIONS_VARIATIONS_REQUEST_SCHEDULER_H_ |
| 6 #define COMPONENTS_VARIATIONS_VARIATIONS_REQUEST_SCHEDULER_H_ | 6 #define COMPONENTS_VARIATIONS_VARIATIONS_REQUEST_SCHEDULER_H_ |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 private: | 50 private: |
| 51 FRIEND_TEST_ALL_PREFIXES(VariationsRequestSchedulerTest, | 51 FRIEND_TEST_ALL_PREFIXES(VariationsRequestSchedulerTest, |
| 52 ScheduleFetchShortly); | 52 ScheduleFetchShortly); |
| 53 | 53 |
| 54 // The task scheduled by this class. | 54 // The task scheduled by this class. |
| 55 base::Closure task_; | 55 base::Closure task_; |
| 56 | 56 |
| 57 // The timer used to repeatedly ping the server. Keep this as an instance | 57 // The timer used to repeatedly ping the server. Keep this as an instance |
| 58 // member so if VariationsRequestScheduler goes out of scope, the timer is | 58 // member so if VariationsRequestScheduler goes out of scope, the timer is |
| 59 // automatically canceled. | 59 // automatically canceled. |
| 60 base::RepeatingTimer<VariationsRequestScheduler> timer_; | 60 base::RepeatingTimer timer_; |
| 61 | 61 |
| 62 // A one-shot timer used for scheduling out-of-band fetches. | 62 // A one-shot timer used for scheduling out-of-band fetches. |
| 63 base::OneShotTimer<VariationsRequestScheduler> one_shot_timer_; | 63 base::OneShotTimer one_shot_timer_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(VariationsRequestScheduler); | 65 DISALLOW_COPY_AND_ASSIGN(VariationsRequestScheduler); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace variations | 68 } // namespace variations |
| 69 | 69 |
| 70 #endif // COMPONENTS_VARIATIONS_VARIATIONS_REQUEST_SCHEDULER_H_ | 70 #endif // COMPONENTS_VARIATIONS_VARIATIONS_REQUEST_SCHEDULER_H_ |
| OLD | NEW |