Gilad Arnold | 78a7811 | 2014-03-13 14:58:06 -0700 | [diff] [blame] | 1 | // Copyright (c) 2014 The Chromium OS 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_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_REAL_TIME_PROVIDER_H_ |
| 6 | #define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_REAL_TIME_PROVIDER_H_ |
| 7 | |
Alex Vakulenko | 75039d7 | 2014-03-25 12:36:28 -0700 | [diff] [blame^] | 8 | #include <base/time/time.h> |
Gilad Arnold | 78a7811 | 2014-03-13 14:58:06 -0700 | [diff] [blame] | 9 | |
| 10 | #include "update_engine/clock_interface.h" |
| 11 | #include "update_engine/policy_manager/time_provider.h" |
| 12 | |
| 13 | namespace chromeos_policy_manager { |
| 14 | |
| 15 | // TimeProvider concrete implementation. |
| 16 | class RealTimeProvider : public TimeProvider { |
| 17 | public: |
| 18 | RealTimeProvider(chromeos_update_engine::ClockInterface* clock) |
| 19 | : clock_(clock) {} |
| 20 | |
| 21 | protected: |
| 22 | virtual bool DoInit(); |
| 23 | |
| 24 | private: |
| 25 | // A clock abstraction (mockable). |
| 26 | chromeos_update_engine::ClockInterface* const clock_; |
| 27 | |
| 28 | DISALLOW_COPY_AND_ASSIGN(RealTimeProvider); |
| 29 | }; |
| 30 | |
| 31 | } // namespace chromeos_policy_manager |
| 32 | |
| 33 | #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_REAL_TIME_PROVIDER_H_ |