blob: b05a14722b7bc2447b11e2afe1938343d2d178b2 [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(
Gilad Arnold5ef9c482014-03-03 13:51:02 -080021 new FakeVariable<bool>("is_connected", kVariableModePoll));
Alex Deymo540d9422014-02-27 11:17:31 -080022 set_var_conn_type(
Gilad Arnold5ef9c482014-03-03 13:51:02 -080023 new FakeVariable<ShillConnType>("conn_type", kVariableModePoll));
Alex Deymo540d9422014-02-27 11:17:31 -080024 set_var_conn_last_changed(
Gilad Arnold5ef9c482014-03-03 13:51:02 -080025 new FakeVariable<base::Time>("conn_last_changed", kVariableModePoll));
Alex Deymo2de23f52014-02-26 14:30:13 -080026 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