PM: Add a time provider.

This implements a time provider interface, as well as a real and a fake
implementation.

BUG=chromium:341205
TEST=Unit tests.

Change-Id: Ibc6a865ab868e0f8c760c003dc970b7987896a36
Reviewed-on: https://chromium-review.googlesource.com/190247
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
diff --git a/policy_manager/real_time_provider.h b/policy_manager/real_time_provider.h
new file mode 100644
index 0000000..447f435
--- /dev/null
+++ b/policy_manager/real_time_provider.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_REAL_TIME_PROVIDER_H_
+#define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_REAL_TIME_PROVIDER_H_
+
+#include <base/time.h>
+
+#include "update_engine/clock_interface.h"
+#include "update_engine/policy_manager/time_provider.h"
+
+namespace chromeos_policy_manager {
+
+// TimeProvider concrete implementation.
+class RealTimeProvider : public TimeProvider {
+ public:
+  RealTimeProvider(chromeos_update_engine::ClockInterface* clock)
+      : clock_(clock) {}
+
+ protected:
+  virtual bool DoInit();
+
+ private:
+  // A clock abstraction (mockable).
+  chromeos_update_engine::ClockInterface* const clock_;
+
+  DISALLOW_COPY_AND_ASSIGN(RealTimeProvider);
+};
+
+}  // namespace chromeos_policy_manager
+
+#endif  // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_REAL_TIME_PROVIDER_H_