blob: 9f2bc3536bd0c5bf800c608cc0d048fb4ea03fc8 [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
Gilad Arnold48415f12014-06-27 07:10:58 -07005#ifndef UPDATE_ENGINE_UPDATE_MANAGER_FAKE_RANDOM_PROVIDER_H_
6#define UPDATE_ENGINE_UPDATE_MANAGER_FAKE_RANDOM_PROVIDER_H_
Alex Deymo272d9492014-02-03 20:28:40 -08007
Alex Deymo63784a52014-05-28 10:46:14 -07008#include "update_engine/update_manager/fake_variable.h"
9#include "update_engine/update_manager/random_provider.h"
Alex Deymo272d9492014-02-03 20:28:40 -080010
Alex Deymo63784a52014-05-28 10:46:14 -070011namespace chromeos_update_manager {
Alex Deymo272d9492014-02-03 20:28:40 -080012
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 Vakulenko157fe302014-08-11 15:59:58 -070018 FakeVariable<uint64_t>* var_seed() override { return &var_seed_; }
Alex Deymo272d9492014-02-03 20:28:40 -080019
20 private:
David Zeuthen21716e22014-04-23 15:42:05 -070021 FakeVariable<uint64_t> var_seed_{"seed", kVariableModePoll};
22
Alex Deymo272d9492014-02-03 20:28:40 -080023 DISALLOW_COPY_AND_ASSIGN(FakeRandomProvider);
24};
25
Alex Deymo63784a52014-05-28 10:46:14 -070026} // namespace chromeos_update_manager
Alex Deymo272d9492014-02-03 20:28:40 -080027
Gilad Arnold48415f12014-06-27 07:10:58 -070028#endif // UPDATE_ENGINE_UPDATE_MANAGER_FAKE_RANDOM_PROVIDER_H_