| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 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 COMPONENTS_COMPONENT_UPDATER_TIMER_H_ | 5 #ifndef COMPONENTS_COMPONENT_UPDATER_TIMER_H_ |
| 6 #define COMPONENTS_COMPONENT_UPDATER_TIMER_H_ | 6 #define COMPONENTS_COMPONENT_UPDATER_TIMER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 base::TimeDelta delay, | 22 base::TimeDelta delay, |
| 23 const base::Closure& user_task); | 23 const base::Closure& user_task); |
| 24 | 24 |
| 25 void Stop(); | 25 void Stop(); |
| 26 | 26 |
| 27 private: | 27 private: |
| 28 void OnDelay(); | 28 void OnDelay(); |
| 29 | 29 |
| 30 base::ThreadChecker thread_checker_; | 30 base::ThreadChecker thread_checker_; |
| 31 | 31 |
| 32 base::Timer timer_; | 32 base::OneShotTimer timer_; |
| 33 | 33 |
| 34 base::TimeDelta delay_; | 34 base::TimeDelta delay_; |
| 35 base::Closure user_task_; | 35 base::Closure user_task_; |
| 36 | 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(Timer); | 37 DISALLOW_COPY_AND_ASSIGN(Timer); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 } // namespace component_updater | 40 } // namespace component_updater |
| 41 | 41 |
| 42 #endif // COMPONENTS_COMPONENT_UPDATER_TIMER_H_ | 42 #endif // COMPONENTS_COMPONENT_UPDATER_TIMER_H_ |
| OLD | NEW |