blob: 49d8896426894bd860a053dd006f6ffff6f0387c [file] [log] [blame]
Gilad Arnold78a78112014-03-13 14:58:06 -07001// 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 Vakulenko75039d72014-03-25 12:36:28 -07008#include <base/time/time.h>
Gilad Arnold78a78112014-03-13 14:58:06 -07009
10#include "update_engine/clock_interface.h"
11#include "update_engine/policy_manager/time_provider.h"
12
13namespace chromeos_policy_manager {
14
15// TimeProvider concrete implementation.
16class 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_