blob: 58868284fc06b99e5b4bac1a75f7a073d06c41c7 [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 FakeVariable<bool> var_is_normal_boot_mode_{
28 "is_normal_boot_mode", kVariableModeConst};
29 FakeVariable<bool> var_is_official_build_{
30 "is_official_build", kVariableModeConst};
31
Alex Deymobd04b142014-03-18 15:00:05 -070032 DISALLOW_COPY_AND_ASSIGN(FakeSystemProvider);
33};
34
35} // namespace chromeos_policy_manager
36
37#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_FAKE_SYSTEM_PROVIDER_H_