| Index: chromeos/dbus/shill_profile_client.cc
|
| diff --git a/chromeos/dbus/flimflam_profile_client.cc b/chromeos/dbus/shill_profile_client.cc
|
| similarity index 72%
|
| rename from chromeos/dbus/flimflam_profile_client.cc
|
| rename to chromeos/dbus/shill_profile_client.cc
|
| index 6de3ab2e85d9a86042b61d7dd876edd3b5846317..78a62b24744b2047afbe202325c8ad00dcc80463 100644
|
| --- a/chromeos/dbus/flimflam_profile_client.cc
|
| +++ b/chromeos/dbus/shill_profile_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_profile_client.h"
|
| +#include "chromeos/dbus/shill_profile_client.h"
|
|
|
| #include "base/bind.h"
|
| #include "base/message_loop.h"
|
| @@ -18,12 +18,12 @@ namespace chromeos {
|
|
|
| namespace {
|
|
|
| -// The FlimflamProfileClient implementation.
|
| -class FlimflamProfileClientImpl : public FlimflamProfileClient {
|
| +// The ShillProfileClient implementation.
|
| +class ShillProfileClientImpl : public ShillProfileClient {
|
| public:
|
| - explicit FlimflamProfileClientImpl(dbus::Bus* bus);
|
| + explicit ShillProfileClientImpl(dbus::Bus* bus);
|
|
|
| - // FlimflamProfileClient overrides:
|
| + // ShillProfileClient overrides:
|
| virtual void SetPropertyChangedHandler(
|
| const dbus::ObjectPath& profile_path,
|
| const PropertyChangedHandler& handler) OVERRIDE;
|
| @@ -39,24 +39,24 @@ class FlimflamProfileClientImpl : public FlimflamProfileClient {
|
| const VoidDBusMethodCallback& callback) OVERRIDE;
|
|
|
| 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& profile_path);
|
| + // Returns the corresponding ShillClientHelper for the profile.
|
| + ShillClientHelper* GetHelper(const dbus::ObjectPath& profile_path);
|
|
|
| dbus::Bus* bus_;
|
| HelperMap helpers_;
|
| STLValueDeleter<HelperMap> helpers_deleter_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(FlimflamProfileClientImpl);
|
| + DISALLOW_COPY_AND_ASSIGN(ShillProfileClientImpl);
|
| };
|
|
|
| -FlimflamProfileClientImpl::FlimflamProfileClientImpl(dbus::Bus* bus)
|
| +ShillProfileClientImpl::ShillProfileClientImpl(dbus::Bus* bus)
|
| : bus_(bus),
|
| helpers_deleter_(&helpers_) {
|
| }
|
|
|
| -FlimflamClientHelper* FlimflamProfileClientImpl::GetHelper(
|
| +ShillClientHelper* ShillProfileClientImpl::GetHelper(
|
| const dbus::ObjectPath& profile_path) {
|
| HelperMap::iterator it = helpers_.find(profile_path.value());
|
| if (it != helpers_.end())
|
| @@ -65,24 +65,24 @@ FlimflamClientHelper* FlimflamProfileClientImpl::GetHelper(
|
| // There is no helper for the profile, create it.
|
| dbus::ObjectProxy* object_proxy =
|
| bus_->GetObjectProxy(flimflam::kFlimflamServiceName, profile_path);
|
| - FlimflamClientHelper* helper = new FlimflamClientHelper(bus_, object_proxy);
|
| + ShillClientHelper* helper = new ShillClientHelper(bus_, object_proxy);
|
| helper->MonitorPropertyChanged(flimflam::kFlimflamProfileInterface);
|
| helpers_.insert(HelperMap::value_type(profile_path.value(), helper));
|
| return helper;
|
| }
|
|
|
| -void FlimflamProfileClientImpl::SetPropertyChangedHandler(
|
| +void ShillProfileClientImpl::SetPropertyChangedHandler(
|
| const dbus::ObjectPath& profile_path,
|
| const PropertyChangedHandler& handler) {
|
| GetHelper(profile_path)->SetPropertyChangedHandler(handler);
|
| }
|
|
|
| -void FlimflamProfileClientImpl::ResetPropertyChangedHandler(
|
| +void ShillProfileClientImpl::ResetPropertyChangedHandler(
|
| const dbus::ObjectPath& profile_path) {
|
| GetHelper(profile_path)->ResetPropertyChangedHandler();
|
| }
|
|
|
| -void FlimflamProfileClientImpl::GetProperties(
|
| +void ShillProfileClientImpl::GetProperties(
|
| const dbus::ObjectPath& profile_path,
|
| const DictionaryValueCallback& callback) {
|
| dbus::MethodCall method_call(flimflam::kFlimflamProfileInterface,
|
| @@ -90,7 +90,7 @@ void FlimflamProfileClientImpl::GetProperties(
|
| GetHelper(profile_path)->CallDictionaryValueMethod(&method_call, callback);
|
| }
|
|
|
| -void FlimflamProfileClientImpl::GetEntry(
|
| +void ShillProfileClientImpl::GetEntry(
|
| const dbus::ObjectPath& profile_path,
|
| const std::string& entry_path,
|
| const DictionaryValueCallback& callback) {
|
| @@ -101,7 +101,7 @@ void FlimflamProfileClientImpl::GetEntry(
|
| GetHelper(profile_path)->CallDictionaryValueMethod(&method_call, callback);
|
| }
|
|
|
| -void FlimflamProfileClientImpl::DeleteEntry(
|
| +void ShillProfileClientImpl::DeleteEntry(
|
| const dbus::ObjectPath& profile_path,
|
| const std::string& entry_path,
|
| const VoidDBusMethodCallback& callback) {
|
| @@ -112,44 +112,44 @@ void FlimflamProfileClientImpl::DeleteEntry(
|
| GetHelper(profile_path)->CallVoidMethod(&method_call, callback);
|
| }
|
|
|
| -// A stub implementation of FlimflamProfileClient.
|
| -class FlimflamProfileClientStubImpl : public FlimflamProfileClient {
|
| +// A stub implementation of ShillProfileClient.
|
| +class ShillProfileClientStubImpl : public ShillProfileClient {
|
| public:
|
| - FlimflamProfileClientStubImpl() : weak_ptr_factory_(this) {}
|
| + ShillProfileClientStubImpl() : weak_ptr_factory_(this) {}
|
|
|
| - virtual ~FlimflamProfileClientStubImpl() {}
|
| + virtual ~ShillProfileClientStubImpl() {}
|
|
|
| - // FlimflamProfileClient override.
|
| + // ShillProfileClient override.
|
| virtual void SetPropertyChangedHandler(
|
| const dbus::ObjectPath& profile_path,
|
| const PropertyChangedHandler& handler) OVERRIDE {}
|
|
|
| - // FlimflamProfileClient override.
|
| + // ShillProfileClient override.
|
| virtual void ResetPropertyChangedHandler(
|
| const dbus::ObjectPath& profile_path) OVERRIDE {}
|
|
|
| - // FlimflamProfileClient override.
|
| + // ShillProfileClient override.
|
| virtual void GetProperties(const dbus::ObjectPath& profile_path,
|
| const DictionaryValueCallback& callback) OVERRIDE {
|
| MessageLoop::current()->PostTask(
|
| FROM_HERE,
|
| - base::Bind(&FlimflamProfileClientStubImpl::PassEmptyDictionaryValue,
|
| + base::Bind(&ShillProfileClientStubImpl::PassEmptyDictionaryValue,
|
| weak_ptr_factory_.GetWeakPtr(),
|
| callback));
|
| }
|
|
|
| - // FlimflamProfileClient override.
|
| + // ShillProfileClient override.
|
| virtual void GetEntry(const dbus::ObjectPath& profile_path,
|
| const std::string& entry_path,
|
| const DictionaryValueCallback& callback) OVERRIDE {
|
| MessageLoop::current()->PostTask(
|
| FROM_HERE,
|
| - base::Bind(&FlimflamProfileClientStubImpl::PassEmptyDictionaryValue,
|
| + base::Bind(&ShillProfileClientStubImpl::PassEmptyDictionaryValue,
|
| weak_ptr_factory_.GetWeakPtr(),
|
| callback));
|
| }
|
|
|
| - // FlimflamProfileClient override.
|
| + // ShillProfileClient override.
|
| virtual void DeleteEntry(const dbus::ObjectPath& profile_path,
|
| const std::string& entry_path,
|
| const VoidDBusMethodCallback& callback) OVERRIDE {
|
| @@ -166,25 +166,25 @@ class FlimflamProfileClientStubImpl : public FlimflamProfileClient {
|
|
|
| // 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<FlimflamProfileClientStubImpl> weak_ptr_factory_;
|
| + base::WeakPtrFactory<ShillProfileClientStubImpl> weak_ptr_factory_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(FlimflamProfileClientStubImpl);
|
| + DISALLOW_COPY_AND_ASSIGN(ShillProfileClientStubImpl);
|
| };
|
|
|
| } // namespace
|
|
|
| -FlimflamProfileClient::FlimflamProfileClient() {}
|
| +ShillProfileClient::ShillProfileClient() {}
|
|
|
| -FlimflamProfileClient::~FlimflamProfileClient() {}
|
| +ShillProfileClient::~ShillProfileClient() {}
|
|
|
| // static
|
| -FlimflamProfileClient* FlimflamProfileClient::Create(
|
| +ShillProfileClient* ShillProfileClient::Create(
|
| DBusClientImplementationType type,
|
| dbus::Bus* bus) {
|
| if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
|
| - return new FlimflamProfileClientImpl(bus);
|
| + return new ShillProfileClientImpl(bus);
|
| DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
|
| - return new FlimflamProfileClientStubImpl();
|
| + return new ShillProfileClientStubImpl();
|
| }
|
|
|
| } // namespace chromeos
|
|
|