| Index: chromeos/dbus/shill_device_client.cc
|
| diff --git a/chromeos/dbus/flimflam_device_client.cc b/chromeos/dbus/shill_device_client.cc
|
| similarity index 88%
|
| rename from chromeos/dbus/flimflam_device_client.cc
|
| rename to chromeos/dbus/shill_device_client.cc
|
| index a6d62861c60718fe1b9d4c15625033255b7cc894..a1c84db43bfb3aec858dd9ad43e928984e5714db 100644
|
| --- a/chromeos/dbus/flimflam_device_client.cc
|
| +++ b/chromeos/dbus/shill_device_client.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chromeos/dbus/flimflam_device_client.h"
|
| +#include "chromeos/dbus/shill_device_client.h"
|
|
|
| #include "base/bind.h"
|
| #include "base/message_loop.h"
|
| @@ -19,16 +19,16 @@ namespace chromeos {
|
|
|
| namespace {
|
|
|
| -// The FlimflamDeviceClient implementation.
|
| -class FlimflamDeviceClientImpl : public FlimflamDeviceClient {
|
| +// The ShillDeviceClient implementation.
|
| +class ShillDeviceClientImpl : public ShillDeviceClient {
|
| public:
|
| - explicit FlimflamDeviceClientImpl(dbus::Bus* bus)
|
| + explicit ShillDeviceClientImpl(dbus::Bus* bus)
|
| : bus_(bus),
|
| helpers_deleter_(&helpers_) {
|
| }
|
|
|
| ///////////////////////////////////////
|
| - // FlimflamDeviceClient overrides.
|
| + // ShillDeviceClient overrides.
|
| virtual void SetPropertyChangedHandler(
|
| const dbus::ObjectPath& device_path,
|
| const PropertyChangedHandler& handler) OVERRIDE {
|
| @@ -70,7 +70,7 @@ class FlimflamDeviceClientImpl : public FlimflamDeviceClient {
|
| flimflam::kSetPropertyFunction);
|
| dbus::MessageWriter writer(&method_call);
|
| writer.AppendString(name);
|
| - FlimflamClientHelper::AppendValueDataAsVariant(&writer, value);
|
| + ShillClientHelper::AppendValueDataAsVariant(&writer, value);
|
| GetHelper(device_path)->CallVoidMethod(&method_call, callback);
|
| }
|
|
|
| @@ -172,10 +172,10 @@ class FlimflamDeviceClientImpl : public FlimflamDeviceClient {
|
| }
|
|
|
| private:
|
| - typedef std::map<std::string, FlimflamClientHelper*> HelperMap;
|
| + typedef std::map<std::string, ShillClientHelper*> HelperMap;
|
|
|
| - // Returns the corresponding FlimflamClientHelper for the profile.
|
| - FlimflamClientHelper* GetHelper(const dbus::ObjectPath& device_path) {
|
| + // Returns the corresponding ShillClientHelper for the profile.
|
| + ShillClientHelper* GetHelper(const dbus::ObjectPath& device_path) {
|
| HelperMap::iterator it = helpers_.find(device_path.value());
|
| if (it != helpers_.end())
|
| return it->second;
|
| @@ -183,7 +183,7 @@ class FlimflamDeviceClientImpl : public FlimflamDeviceClient {
|
| // There is no helper for the profile, create it.
|
| dbus::ObjectProxy* object_proxy =
|
| bus_->GetObjectProxy(flimflam::kFlimflamServiceName, device_path);
|
| - FlimflamClientHelper* helper = new FlimflamClientHelper(bus_, object_proxy);
|
| + ShillClientHelper* helper = new ShillClientHelper(bus_, object_proxy);
|
| helper->MonitorPropertyChanged(flimflam::kFlimflamDeviceInterface);
|
| helpers_.insert(HelperMap::value_type(device_path.value(), helper));
|
| return helper;
|
| @@ -193,14 +193,14 @@ class FlimflamDeviceClientImpl : public FlimflamDeviceClient {
|
| HelperMap helpers_;
|
| STLValueDeleter<HelperMap> helpers_deleter_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(FlimflamDeviceClientImpl);
|
| + DISALLOW_COPY_AND_ASSIGN(ShillDeviceClientImpl);
|
| };
|
|
|
| -// A stub implementation of FlimflamDeviceClient.
|
| +// A stub implementation of ShillDeviceClient.
|
| // Implemented: Stub cellular device for SMS testing.
|
| -class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient {
|
| +class ShillDeviceClientStubImpl : public ShillDeviceClient {
|
| public:
|
| - FlimflamDeviceClientStubImpl() : weak_ptr_factory_(this) {
|
| + ShillDeviceClientStubImpl() : weak_ptr_factory_(this) {
|
| // Add a cellular device for SMS. Note: name matches Manager entry.
|
| const char kStubCellular1[] = "stub_cellular1";
|
| base::DictionaryValue* cellular_properties = new base::DictionaryValue;
|
| @@ -233,40 +233,40 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient {
|
| stub_devices_.Set(kStubCellular2, cellular_properties);
|
| }
|
|
|
| - virtual ~FlimflamDeviceClientStubImpl() {}
|
| + virtual ~ShillDeviceClientStubImpl() {}
|
|
|
| - // FlimflamDeviceClient override.
|
| + // ShillDeviceClient override.
|
| virtual void SetPropertyChangedHandler(
|
| const dbus::ObjectPath& device_path,
|
| const PropertyChangedHandler& handler) OVERRIDE {}
|
|
|
| - // FlimflamDeviceClient override.
|
| + // ShillDeviceClient override.
|
| virtual void ResetPropertyChangedHandler(
|
| const dbus::ObjectPath& device_path) OVERRIDE {}
|
|
|
| - // FlimflamDeviceClient override.
|
| + // ShillDeviceClient override.
|
| virtual void GetProperties(const dbus::ObjectPath& device_path,
|
| const DictionaryValueCallback& callback) OVERRIDE {
|
| MessageLoop::current()->PostTask(
|
| FROM_HERE,
|
| - base::Bind(&FlimflamDeviceClientStubImpl::PassStubDevicePrperties,
|
| + base::Bind(&ShillDeviceClientStubImpl::PassStubDevicePrperties,
|
| weak_ptr_factory_.GetWeakPtr(),
|
| device_path, callback));
|
| }
|
|
|
| - // FlimflamDeviceClient override.
|
| + // ShillDeviceClient override.
|
| virtual base::DictionaryValue* CallGetPropertiesAndBlock(
|
| const dbus::ObjectPath& device_path) OVERRIDE {
|
| return new base::DictionaryValue;
|
| }
|
|
|
| - // FlimflamProfileClient override.
|
| + // ShillProfileClient override.
|
| virtual void ProposeScan(const dbus::ObjectPath& device_path,
|
| const VoidDBusMethodCallback& callback) OVERRIDE {
|
| PostVoidCallback(callback, DBUS_METHOD_CALL_SUCCESS);
|
| }
|
|
|
| - // FlimflamDeviceClient override.
|
| + // ShillDeviceClient override.
|
| virtual void SetProperty(const dbus::ObjectPath& device_path,
|
| const std::string& name,
|
| const base::Value& value,
|
| @@ -280,7 +280,7 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient {
|
| PostVoidCallback(callback, DBUS_METHOD_CALL_SUCCESS);
|
| }
|
|
|
| - // FlimflamDeviceClient override.
|
| + // ShillDeviceClient override.
|
| virtual void ClearProperty(const dbus::ObjectPath& device_path,
|
| const std::string& name,
|
| const VoidDBusMethodCallback& callback) OVERRIDE {
|
| @@ -293,7 +293,7 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient {
|
| PostVoidCallback(callback, DBUS_METHOD_CALL_SUCCESS);
|
| }
|
|
|
| - // FlimflamDeviceClient override.
|
| + // ShillDeviceClient override.
|
| virtual void AddIPConfig(
|
| const dbus::ObjectPath& device_path,
|
| const std::string& method,
|
| @@ -304,14 +304,14 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient {
|
| dbus::ObjectPath()));
|
| }
|
|
|
| - // FlimflamDeviceClient override.
|
| + // ShillDeviceClient override.
|
| virtual dbus::ObjectPath CallAddIPConfigAndBlock(
|
| const dbus::ObjectPath& device_path,
|
| const std::string& method) OVERRIDE {
|
| return dbus::ObjectPath();
|
| }
|
|
|
| - // FlimflamDeviceClient override.
|
| + // ShillDeviceClient override.
|
| virtual void RequirePin(const dbus::ObjectPath& device_path,
|
| const std::string& pin,
|
| bool require,
|
| @@ -320,7 +320,7 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient {
|
| MessageLoop::current()->PostTask(FROM_HERE, callback);
|
| }
|
|
|
| - // FlimflamDeviceClient override.
|
| + // ShillDeviceClient override.
|
| virtual void EnterPin(const dbus::ObjectPath& device_path,
|
| const std::string& pin,
|
| const base::Closure& callback,
|
| @@ -328,7 +328,7 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient {
|
| MessageLoop::current()->PostTask(FROM_HERE, callback);
|
| }
|
|
|
| - // FlimflamDeviceClient override.
|
| + // ShillDeviceClient override.
|
| virtual void UnblockPin(const dbus::ObjectPath& device_path,
|
| const std::string& puk,
|
| const std::string& pin,
|
| @@ -337,7 +337,7 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient {
|
| MessageLoop::current()->PostTask(FROM_HERE, callback);
|
| }
|
|
|
| - // FlimflamDeviceClient override.
|
| + // ShillDeviceClient override.
|
| virtual void ChangePin(const dbus::ObjectPath& device_path,
|
| const std::string& old_pin,
|
| const std::string& new_pin,
|
| @@ -346,7 +346,7 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient {
|
| MessageLoop::current()->PostTask(FROM_HERE, callback);
|
| }
|
|
|
| - // FlimflamDeviceClient override.
|
| + // ShillDeviceClient override.
|
| virtual void Register(const dbus::ObjectPath& device_path,
|
| const std::string& network_id,
|
| const base::Closure& callback,
|
| @@ -378,25 +378,25 @@ class FlimflamDeviceClientStubImpl : public FlimflamDeviceClient {
|
|
|
| // Note: This should remain the last member so it'll be destroyed and
|
| // invalidate its weak pointers before any other members are destroyed.
|
| - base::WeakPtrFactory<FlimflamDeviceClientStubImpl> weak_ptr_factory_;
|
| + base::WeakPtrFactory<ShillDeviceClientStubImpl> weak_ptr_factory_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(FlimflamDeviceClientStubImpl);
|
| + DISALLOW_COPY_AND_ASSIGN(ShillDeviceClientStubImpl);
|
| };
|
|
|
| } // namespace
|
|
|
| -FlimflamDeviceClient::FlimflamDeviceClient() {}
|
| +ShillDeviceClient::ShillDeviceClient() {}
|
|
|
| -FlimflamDeviceClient::~FlimflamDeviceClient() {}
|
| +ShillDeviceClient::~ShillDeviceClient() {}
|
|
|
| // static
|
| -FlimflamDeviceClient* FlimflamDeviceClient::Create(
|
| +ShillDeviceClient* ShillDeviceClient::Create(
|
| DBusClientImplementationType type,
|
| dbus::Bus* bus) {
|
| if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
|
| - return new FlimflamDeviceClientImpl(bus);
|
| + return new ShillDeviceClientImpl(bus);
|
| DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
|
| - return new FlimflamDeviceClientStubImpl();
|
| + return new ShillDeviceClientStubImpl();
|
| }
|
|
|
| } // namespace chromeos
|
|
|