blob: f75ef2c01ea89598a75806f60deb105fcec12013 [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
5#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_FAKE_SHILL_PROVIDER_H
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_FAKE_SHILL_PROVIDER_H
7
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
18 protected:
19 virtual bool DoInit() {
Alex Deymo540d9422014-02-27 11:17:31 -080020 set_var_is_connected(
Alex Deymo2de23f52014-02-26 14:30:13 -080021 new FakeVariable<bool>("is_connected", kVariableModeAsync));
Alex Deymo540d9422014-02-27 11:17:31 -080022 set_var_conn_type(
Alex Deymo2de23f52014-02-26 14:30:13 -080023 new FakeVariable<ShillConnType>("conn_type", kVariableModeAsync));
Alex Deymo540d9422014-02-27 11:17:31 -080024 set_var_conn_last_changed(
Alex Deymo2de23f52014-02-26 14:30:13 -080025 new FakeVariable<Time>("conn_last_changed", kVariableModeAsync));
26 return true;
27 }
28
29 private:
30 DISALLOW_COPY_AND_ASSIGN(FakeShillProvider);
31};
32
33} // namespace chromeos_policy_manager
34
35#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_FAKE_SHILL_PROVIDER_H