OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROMEOS_COMPONENTS_TETHER_TIMER_FACTORY_H_ |
| 6 #define CHROMEOS_COMPONENTS_TETHER_TIMER_FACTORY_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "base/memory/ptr_util.h" |
| 12 #include "base/timer/timer.h" |
| 13 |
| 14 namespace chromeos { |
| 15 |
| 16 namespace tether { |
| 17 |
| 18 // Serves as a simple Timer creator, injected into classes that use Timers. |
| 19 // Is intended to be overriden during testing in order to stub or mock the |
| 20 // Timers used by the object under test. |
| 21 class TimerFactory { |
| 22 public: |
| 23 virtual ~TimerFactory(); |
| 24 |
| 25 virtual std::unique_ptr<base::Timer> CreateOneShotTimer(); |
| 26 }; |
| 27 |
| 28 } // namespace tether |
| 29 |
| 30 } // namespace chromeos |
| 31 |
| 32 #endif // CHROMEOS_COMPONENTS_TETHER_TIMER_FACTORY_H_ |
OLD | NEW |