OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_STUB_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_SHILL_PROFILE_CLIENT_H_ |
6 #define CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_STUB_H_ | 6 #define CHROMEOS_DBUS_FAKE_SHILL_PROFILE_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "chromeos/chromeos_export.h" |
12 #include "chromeos/dbus/shill_manager_client.h" | 13 #include "chromeos/dbus/shill_manager_client.h" |
13 #include "chromeos/dbus/shill_profile_client.h" | 14 #include "chromeos/dbus/shill_profile_client.h" |
14 | 15 |
15 namespace chromeos { | 16 namespace chromeos { |
16 | 17 |
17 // A stub implementation of ShillProfileClient. | 18 // A stub implementation of ShillProfileClient. |
18 class ShillProfileClientStub : public ShillProfileClient, | 19 class CHROMEOS_EXPORT FakeShillProfileClient : |
19 public ShillProfileClient::TestInterface { | 20 public ShillProfileClient, |
| 21 public ShillProfileClient::TestInterface { |
20 public: | 22 public: |
21 ShillProfileClientStub(); | 23 FakeShillProfileClient(); |
22 virtual ~ShillProfileClientStub(); | 24 virtual ~FakeShillProfileClient(); |
23 | 25 |
24 // ShillProfileClient overrides | 26 // ShillProfileClient overrides |
25 virtual void Init(dbus::Bus* bus) OVERRIDE; | 27 virtual void Init(dbus::Bus* bus) OVERRIDE; |
26 virtual void AddPropertyChangedObserver( | 28 virtual void AddPropertyChangedObserver( |
27 const dbus::ObjectPath& profile_path, | 29 const dbus::ObjectPath& profile_path, |
28 ShillPropertyChangedObserver* observer) OVERRIDE; | 30 ShillPropertyChangedObserver* observer) OVERRIDE; |
29 virtual void RemovePropertyChangedObserver( | 31 virtual void RemovePropertyChangedObserver( |
30 const dbus::ObjectPath& profile_path, | 32 const dbus::ObjectPath& profile_path, |
31 ShillPropertyChangedObserver* observer) OVERRIDE; | 33 ShillPropertyChangedObserver* observer) OVERRIDE; |
32 virtual void GetProperties( | 34 virtual void GetProperties( |
(...skipping 24 matching lines...) Expand all Loading... |
57 struct ProfileProperties; | 59 struct ProfileProperties; |
58 typedef std::map<std::string, ProfileProperties*> ProfileMap; | 60 typedef std::map<std::string, ProfileProperties*> ProfileMap; |
59 | 61 |
60 ProfileProperties* GetProfile(const dbus::ObjectPath& profile_path, | 62 ProfileProperties* GetProfile(const dbus::ObjectPath& profile_path, |
61 const ErrorCallback& error_callback); | 63 const ErrorCallback& error_callback); |
62 | 64 |
63 // The values are owned by this class and are explicitly destroyed where | 65 // The values are owned by this class and are explicitly destroyed where |
64 // necessary. | 66 // necessary. |
65 ProfileMap profiles_; | 67 ProfileMap profiles_; |
66 | 68 |
67 DISALLOW_COPY_AND_ASSIGN(ShillProfileClientStub); | 69 DISALLOW_COPY_AND_ASSIGN(FakeShillProfileClient); |
68 }; | 70 }; |
69 | 71 |
70 } // namespace chromeos | 72 } // namespace chromeos |
71 | 73 |
72 #endif // CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_STUB_H_ | 74 #endif // CHROMEOS_DBUS_FAKE_SHILL_PROFILE_CLIENT_H_ |
OLD | NEW |