blob: d3e36971613e82040c4e64432da7107280c0d31f [file] [log] [blame]
Alex Deymo2de23f52014-02-26 14:30:13 -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_FAKE_SHILL_PROVIDER_H_
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_FAKE_SHILL_PROVIDER_H_
Alex Deymo2de23f52014-02-26 14:30:13 -08007
8#include "update_engine/policy_manager/fake_variable.h"
9#include "update_engine/policy_manager/shill_provider.h"
10
11namespace chromeos_policy_manager {
12
13// Fake implementation of the ShillProvider base class.
14class FakeShillProvider : public ShillProvider {
15 public:
16 FakeShillProvider() {}
17
Gilad Arnolddf3dd242014-04-09 07:15:51 -070018 virtual inline FakeVariable<bool>* var_is_connected() override {
19 return &var_is_connected_;
Alex Deymo2de23f52014-02-26 14:30:13 -080020 }
21
Gilad Arnolddf3dd242014-04-09 07:15:51 -070022 virtual inline FakeVariable<ConnectionType>* var_conn_type() override {
23 return &var_conn_type_;
24 }
25
26 virtual inline FakeVariable<base::Time>* var_conn_last_changed() override {
27 return &var_conn_last_changed_;
28 }
29
30 protected:
31 virtual bool DoInit() { return true; }
32
Alex Deymo2de23f52014-02-26 14:30:13 -080033 private:
Gilad Arnolddf3dd242014-04-09 07:15:51 -070034 FakeVariable<bool> var_is_connected_{"is_connected", kVariableModePoll};
35 FakeVariable<ConnectionType> var_conn_type_{"conn_type", kVariableModePoll};
36 FakeVariable<base::Time> var_conn_last_changed_{"conn_last_changed",
37 kVariableModePoll};
38
Alex Deymo2de23f52014-02-26 14:30:13 -080039 DISALLOW_COPY_AND_ASSIGN(FakeShillProvider);
40};
41
42} // namespace chromeos_policy_manager
43
Gilad Arnold2cbb3852014-03-07 12:40:50 -080044#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_FAKE_SHILL_PROVIDER_H_