| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_SERVICE_CLIENT_STUB_H_ | 5 #ifndef CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_H_ |
| 6 #define CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_H_ | 6 #define CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_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 "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "chromeos/dbus/shill_service_client.h" | 14 #include "chromeos/dbus/shill_service_client.h" |
| 15 | 15 |
| 16 namespace chromeos { | 16 namespace chromeos { |
| 17 | 17 |
| 18 // A stub implementation of ShillServiceClient. This works in close coordination | 18 // A stub implementation of ShillServiceClient. This works in close coordination |
| 19 // with ShillManagerClientStub and is not intended to be used independently. | 19 // with ShillManagerClientStub and is not intended to be used independently. |
| 20 class ShillServiceClientStub : public ShillServiceClient, | 20 class ShillServiceClientStub : public ShillServiceClient, |
| 21 public ShillServiceClient::TestInterface { | 21 public ShillServiceClient::TestInterface { |
| 22 public: | 22 public: |
| 23 ShillServiceClientStub(); | 23 ShillServiceClientStub(); |
| 24 virtual ~ShillServiceClientStub(); | 24 virtual ~ShillServiceClientStub(); |
| 25 | 25 |
| 26 // Returns true when stub portalled wifi is enabled and it's service |
| 27 // path equals to |path|. |
| 28 static bool IsStubPortalledWifiEnabled(const std::string& path); |
| 29 |
| 26 // ShillServiceClient overrides. | 30 // ShillServiceClient overrides. |
| 27 virtual void AddPropertyChangedObserver( | 31 virtual void AddPropertyChangedObserver( |
| 28 const dbus::ObjectPath& service_path, | 32 const dbus::ObjectPath& service_path, |
| 29 ShillPropertyChangedObserver* observer) OVERRIDE; | 33 ShillPropertyChangedObserver* observer) OVERRIDE; |
| 30 virtual void RemovePropertyChangedObserver( | 34 virtual void RemovePropertyChangedObserver( |
| 31 const dbus::ObjectPath& service_path, | 35 const dbus::ObjectPath& service_path, |
| 32 ShillPropertyChangedObserver* observer) OVERRIDE; | 36 ShillPropertyChangedObserver* observer) OVERRIDE; |
| 33 virtual void GetProperties(const dbus::ObjectPath& service_path, | 37 virtual void GetProperties(const dbus::ObjectPath& service_path, |
| 34 const DictionaryValueCallback& callback) OVERRIDE; | 38 const DictionaryValueCallback& callback) OVERRIDE; |
| 35 virtual void SetProperty(const dbus::ObjectPath& service_path, | 39 virtual void SetProperty(const dbus::ObjectPath& service_path, |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // Note: This should remain the last member so it'll be destroyed and | 119 // Note: This should remain the last member so it'll be destroyed and |
| 116 // invalidate its weak pointers before any other members are destroyed. | 120 // invalidate its weak pointers before any other members are destroyed. |
| 117 base::WeakPtrFactory<ShillServiceClientStub> weak_ptr_factory_; | 121 base::WeakPtrFactory<ShillServiceClientStub> weak_ptr_factory_; |
| 118 | 122 |
| 119 DISALLOW_COPY_AND_ASSIGN(ShillServiceClientStub); | 123 DISALLOW_COPY_AND_ASSIGN(ShillServiceClientStub); |
| 120 }; | 124 }; |
| 121 | 125 |
| 122 } // namespace chromeos | 126 } // namespace chromeos |
| 123 | 127 |
| 124 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_H_ | 128 #endif // CHROMEOS_DBUS_SHILL_SERVICE_CLIENT_STUB_H_ |
| OLD | NEW |