blob: 81d3ebe69bc31656377549d45a31a05cf9ef8745 [file] [log] [blame]
Alex Deymo272d9492014-02-03 20:28:40 -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
5#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_FAKE_RANDOM_PROVIDER_H
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_FAKE_RANDOM_PROVIDER_H
7
Alex Deymo6e97bb22014-02-05 16:46:16 -08008#include "update_engine/policy_manager/fake_variable.h"
9#include "update_engine/policy_manager/random_provider.h"
Alex Deymo272d9492014-02-03 20:28:40 -080010
11namespace chromeos_policy_manager {
12
13// Fake implementation of the RandomProvider base class.
14class FakeRandomProvider : public RandomProvider {
Alex Deymo2de23f52014-02-26 14:30:13 -080015 public:
16 FakeRandomProvider() {}
17
Alex Deymo272d9492014-02-03 20:28:40 -080018 protected:
19 virtual bool DoInit() {
Alex Deymo2de23f52014-02-26 14:30:13 -080020 seed_.reset(new FakeVariable<uint64_t>("random_seed", kVariableModeConst));
Alex Deymo272d9492014-02-03 20:28:40 -080021 return true;
22 }
23
24 private:
25 DISALLOW_COPY_AND_ASSIGN(FakeRandomProvider);
26};
27
28} // namespace chromeos_policy_manager
29
30#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_FAKE_RANDOM_PROVIDER_H