blob: fbdff49517b8c726f425ec685f4f9abc01a0c15e [file] [log] [blame]
Alex Deymobd04b142014-03-18 15:00:05 -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_FAKE_SYSTEM_PROVIDER_H_
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_FAKE_SYSTEM_PROVIDER_H_
7
8#include "update_engine/policy_manager/fake_variable.h"
9#include "update_engine/policy_manager/system_provider.h"
10
11namespace chromeos_policy_manager {
12
13// Fake implementation of the SystemProvider base class.
14class FakeSystemProvider : public SystemProvider {
15 public:
16 FakeSystemProvider() {}
17
David Zeuthen21716e22014-04-23 15:42:05 -070018 virtual FakeVariable<bool>* var_is_normal_boot_mode() override {
19 return &var_is_normal_boot_mode_;
20 }
21
22 virtual FakeVariable<bool>* var_is_official_build() override {
23 return &var_is_official_build_;
Alex Deymobd04b142014-03-18 15:00:05 -070024 }
25
26 private:
David Zeuthen21716e22014-04-23 15:42:05 -070027 virtual bool DoInit() override { return true; }
28
29 FakeVariable<bool> var_is_normal_boot_mode_{
30 "is_normal_boot_mode", kVariableModeConst};
31 FakeVariable<bool> var_is_official_build_{
32 "is_official_build", kVariableModeConst};
33
Alex Deymobd04b142014-03-18 15:00:05 -070034 DISALLOW_COPY_AND_ASSIGN(FakeSystemProvider);
35};
36
37} // namespace chromeos_policy_manager
38
39#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_FAKE_SYSTEM_PROVIDER_H_