| Index: chromeos/dbus/shill_network_client.cc
|
| diff --git a/chromeos/dbus/flimflam_network_client.cc b/chromeos/dbus/shill_network_client.cc
|
| similarity index 69%
|
| rename from chromeos/dbus/flimflam_network_client.cc
|
| rename to chromeos/dbus/shill_network_client.cc
|
| index 2059807412ec04b41fcb3eee4fa386b7dadc5baa..dd70ebbde29e473e0e7ae9cbeeb45d239e2e0acc 100644
|
| --- a/chromeos/dbus/flimflam_network_client.cc
|
| +++ b/chromeos/dbus/shill_network_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_network_client.h"
|
| +#include "chromeos/dbus/shill_network_client.h"
|
|
|
| #include "base/bind.h"
|
| #include "base/message_loop.h"
|
| @@ -19,28 +19,28 @@ namespace chromeos {
|
|
|
| namespace {
|
|
|
| -// The FlimflamNetworkClient implementation.
|
| -class FlimflamNetworkClientImpl : public FlimflamNetworkClient {
|
| +// The ShillNetworkClient implementation.
|
| +class ShillNetworkClientImpl : public ShillNetworkClient {
|
| public:
|
| - explicit FlimflamNetworkClientImpl(dbus::Bus* bus)
|
| + explicit ShillNetworkClientImpl(dbus::Bus* bus)
|
| : bus_(bus),
|
| helpers_deleter_(&helpers_) {
|
| }
|
|
|
| - // FlimflamNetworkClient override.
|
| + // ShillNetworkClient override.
|
| virtual void SetPropertyChangedHandler(
|
| const dbus::ObjectPath& network_path,
|
| const PropertyChangedHandler& handler) OVERRIDE {
|
| GetHelper(network_path)->SetPropertyChangedHandler(handler);
|
| }
|
|
|
| - // FlimflamNetworkClient override.
|
| + // ShillNetworkClient override.
|
| virtual void ResetPropertyChangedHandler(
|
| const dbus::ObjectPath& network_path) OVERRIDE {
|
| GetHelper(network_path)->ResetPropertyChangedHandler();
|
| }
|
|
|
| - // FlimflamNetworkClient override.
|
| + // ShillNetworkClient override.
|
| virtual void GetProperties(const dbus::ObjectPath& network_path,
|
| const DictionaryValueCallback& callback) OVERRIDE {
|
| dbus::MethodCall method_call(flimflam::kFlimflamNetworkInterface,
|
| @@ -48,7 +48,7 @@ class FlimflamNetworkClientImpl : public FlimflamNetworkClient {
|
| GetHelper(network_path)->CallDictionaryValueMethod(&method_call, callback);
|
| }
|
|
|
| - // FlimflamNetworkClient override.
|
| + // ShillNetworkClient override.
|
| virtual base::DictionaryValue* CallGetPropertiesAndBlock(
|
| const dbus::ObjectPath& network_path) OVERRIDE {
|
| dbus::MethodCall method_call(flimflam::kFlimflamNetworkInterface,
|
| @@ -58,10 +58,10 @@ class FlimflamNetworkClientImpl : public FlimflamNetworkClient {
|
| }
|
|
|
| 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& network_path) {
|
| + // Returns the corresponding ShillClientHelper for the profile.
|
| + ShillClientHelper* GetHelper(const dbus::ObjectPath& network_path) {
|
| HelperMap::iterator it = helpers_.find(network_path.value());
|
| if (it != helpers_.end())
|
| return it->second;
|
| @@ -69,7 +69,7 @@ class FlimflamNetworkClientImpl : public FlimflamNetworkClient {
|
| // There is no helper for the profile, create it.
|
| dbus::ObjectProxy* object_proxy =
|
| bus_->GetObjectProxy(flimflam::kFlimflamServiceName, network_path);
|
| - FlimflamClientHelper* helper = new FlimflamClientHelper(bus_, object_proxy);
|
| + ShillClientHelper* helper = new ShillClientHelper(bus_, object_proxy);
|
| helper->MonitorPropertyChanged(flimflam::kFlimflamNetworkInterface);
|
| helpers_.insert(HelperMap::value_type(network_path.value(), helper));
|
| return helper;
|
| @@ -79,36 +79,36 @@ class FlimflamNetworkClientImpl : public FlimflamNetworkClient {
|
| HelperMap helpers_;
|
| STLValueDeleter<HelperMap> helpers_deleter_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(FlimflamNetworkClientImpl);
|
| + DISALLOW_COPY_AND_ASSIGN(ShillNetworkClientImpl);
|
| };
|
|
|
| -// A stub implementation of FlimflamNetworkClient.
|
| -class FlimflamNetworkClientStubImpl : public FlimflamNetworkClient {
|
| +// A stub implementation of ShillNetworkClient.
|
| +class ShillNetworkClientStubImpl : public ShillNetworkClient {
|
| public:
|
| - FlimflamNetworkClientStubImpl() : weak_ptr_factory_(this) {}
|
| + ShillNetworkClientStubImpl() : weak_ptr_factory_(this) {}
|
|
|
| - virtual ~FlimflamNetworkClientStubImpl() {}
|
| + virtual ~ShillNetworkClientStubImpl() {}
|
|
|
| - // FlimflamNetworkClient override.
|
| + // ShillNetworkClient override.
|
| virtual void SetPropertyChangedHandler(
|
| const dbus::ObjectPath& network_path,
|
| const PropertyChangedHandler& handler) OVERRIDE {}
|
|
|
| - // FlimflamNetworkClient override.
|
| + // ShillNetworkClient override.
|
| virtual void ResetPropertyChangedHandler(
|
| const dbus::ObjectPath& network_path) OVERRIDE {}
|
|
|
| - // FlimflamNetworkClient override.
|
| + // ShillNetworkClient override.
|
| virtual void GetProperties(const dbus::ObjectPath& network_path,
|
| const DictionaryValueCallback& callback) OVERRIDE {
|
| MessageLoop::current()->PostTask(
|
| FROM_HERE,
|
| - base::Bind(&FlimflamNetworkClientStubImpl::PassEmptyDictionaryValue,
|
| + base::Bind(&ShillNetworkClientStubImpl::PassEmptyDictionaryValue,
|
| weak_ptr_factory_.GetWeakPtr(),
|
| callback));
|
| }
|
|
|
| - // FlimflamNetworkClient override.
|
| + // ShillNetworkClient override.
|
| virtual base::DictionaryValue* CallGetPropertiesAndBlock(
|
| const dbus::ObjectPath& network_path) OVERRIDE {
|
| return new base::DictionaryValue;
|
| @@ -122,25 +122,25 @@ class FlimflamNetworkClientStubImpl : public FlimflamNetworkClient {
|
|
|
| // 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<FlimflamNetworkClientStubImpl> weak_ptr_factory_;
|
| + base::WeakPtrFactory<ShillNetworkClientStubImpl> weak_ptr_factory_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(FlimflamNetworkClientStubImpl);
|
| + DISALLOW_COPY_AND_ASSIGN(ShillNetworkClientStubImpl);
|
| };
|
|
|
| } // namespace
|
|
|
| -FlimflamNetworkClient::FlimflamNetworkClient() {}
|
| +ShillNetworkClient::ShillNetworkClient() {}
|
|
|
| -FlimflamNetworkClient::~FlimflamNetworkClient() {}
|
| +ShillNetworkClient::~ShillNetworkClient() {}
|
|
|
| // static
|
| -FlimflamNetworkClient* FlimflamNetworkClient::Create(
|
| +ShillNetworkClient* ShillNetworkClient::Create(
|
| DBusClientImplementationType type,
|
| dbus::Bus* bus) {
|
| if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
|
| - return new FlimflamNetworkClientImpl(bus);
|
| + return new ShillNetworkClientImpl(bus);
|
| DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
|
| - return new FlimflamNetworkClientStubImpl();
|
| + return new ShillNetworkClientStubImpl();
|
| }
|
|
|
| } // namespace chromeos
|
|
|