Alex Deymo | 2de23f5 | 2014-02-26 14:30:13 -0800 | [diff] [blame^] | 1 | // 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 | |
| 11 | namespace chromeos_policy_manager { |
| 12 | |
| 13 | // Fake implementation of the ShillProvider base class. |
| 14 | class FakeShillProvider : public ShillProvider { |
| 15 | public: |
| 16 | FakeShillProvider() {} |
| 17 | |
| 18 | protected: |
| 19 | virtual bool DoInit() { |
| 20 | var_is_connected_.reset( |
| 21 | new FakeVariable<bool>("is_connected", kVariableModeAsync)); |
| 22 | var_conn_type_.reset( |
| 23 | new FakeVariable<ShillConnType>("conn_type", kVariableModeAsync)); |
| 24 | var_conn_last_changed_.reset( |
| 25 | 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 |