blob: 7dd8fab1410ffe6a77e4d24cbfff92fae7c5fb7f [file] [log] [blame]
Alex Deymobb019fe2014-02-03 20:12:17 -08001// 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
Gilad Arnold2cbb3852014-03-07 12:40:50 -08005#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_REAL_RANDOM_PROVIDER_H_
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_REAL_RANDOM_PROVIDER_H_
Alex Deymobb019fe2014-02-03 20:12:17 -08007
Alex Deymo6e97bb22014-02-05 16:46:16 -08008#include "update_engine/policy_manager/random_provider.h"
Alex Deymobb019fe2014-02-03 20:12:17 -08009
10namespace chromeos_policy_manager {
11
12// RandomProvider implementation class.
13class RealRandomProvider : public RandomProvider {
14 public:
15 RealRandomProvider() {}
16
David Zeuthen21716e22014-04-23 15:42:05 -070017 virtual Variable<uint64_t>* var_seed() override { return var_seed_.get(); }
Alex Deymobb019fe2014-02-03 20:12:17 -080018
19 private:
David Zeuthen21716e22014-04-23 15:42:05 -070020 virtual bool DoInit(void) override;
21
22 // The seed() scoped variable.
23 scoped_ptr<Variable<uint64_t>> var_seed_;
24
Alex Deymobb019fe2014-02-03 20:12:17 -080025 DISALLOW_COPY_AND_ASSIGN(RealRandomProvider);
26};
27
28} // namespace chromeos_policy_manager
29
Gilad Arnold2cbb3852014-03-07 12:40:50 -080030#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_REAL_RANDOM_PROVIDER_H_