Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5115)

Unified Diff: chromeos/dbus/shill_service_client.cc

Issue 10915106: Renaming instances of "flimflam" with "shill", now that we're only (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Upload after merge Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/dbus/shill_service_client.h ('k') | chromeos/dbus/shill_service_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/shill_service_client.cc
diff --git a/chromeos/dbus/flimflam_service_client.cc b/chromeos/dbus/shill_service_client.cc
similarity index 79%
rename from chromeos/dbus/flimflam_service_client.cc
rename to chromeos/dbus/shill_service_client.cc
index 15a5b8a203920b849c73ca83db298d25ef65cb66..91f269032233fc3a2c02af198b552c60bf71f2c1 100644
--- a/chromeos/dbus/flimflam_service_client.cc
+++ b/chromeos/dbus/shill_service_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_service_client.h"
+#include "chromeos/dbus/shill_service_client.h"
#include "base/bind.h"
#include "base/chromeos/chromeos_version.h"
@@ -21,11 +21,11 @@ namespace {
// Error callback for GetProperties.
void OnGetPropertiesError(
const dbus::ObjectPath& service_path,
- const FlimflamServiceClient::DictionaryValueCallback& callback,
+ const ShillServiceClient::DictionaryValueCallback& callback,
const std::string& error_name,
const std::string& error_message) {
const std::string log_string =
- "Failed to call org.chromium.flimflam.Service.GetProperties for: " +
+ "Failed to call org.chromium.shill.Service.GetProperties for: " +
service_path.value() + ": " + error_name + ": " + error_message;
// Suppress ERROR log if error name is
@@ -39,28 +39,28 @@ void OnGetPropertiesError(
callback.Run(DBUS_METHOD_CALL_FAILURE, empty_dictionary);
}
-// The FlimflamServiceClient implementation.
-class FlimflamServiceClientImpl : public FlimflamServiceClient {
+// The ShillServiceClient implementation.
+class ShillServiceClientImpl : public ShillServiceClient {
public:
- explicit FlimflamServiceClientImpl(dbus::Bus* bus)
+ explicit ShillServiceClientImpl(dbus::Bus* bus)
: bus_(bus),
helpers_deleter_(&helpers_) {
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void SetPropertyChangedHandler(
const dbus::ObjectPath& service_path,
const PropertyChangedHandler& handler) OVERRIDE {
GetHelper(service_path)->SetPropertyChangedHandler(handler);
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void ResetPropertyChangedHandler(
const dbus::ObjectPath& service_path) OVERRIDE {
GetHelper(service_path)->ResetPropertyChangedHandler();
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void GetProperties(const dbus::ObjectPath& service_path,
const DictionaryValueCallback& callback) OVERRIDE {
dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface,
@@ -71,7 +71,7 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient {
base::Bind(&OnGetPropertiesError, service_path, callback));
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void SetProperty(const dbus::ObjectPath& service_path,
const std::string& name,
const base::Value& value,
@@ -80,11 +80,11 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient {
flimflam::kSetPropertyFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(name);
- FlimflamClientHelper::AppendValueDataAsVariant(&writer, value);
+ ShillClientHelper::AppendValueDataAsVariant(&writer, value);
GetHelper(service_path)->CallVoidMethod(&method_call, callback);
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void ClearProperty(const dbus::ObjectPath& service_path,
const std::string& name,
const VoidDBusMethodCallback& callback) OVERRIDE {
@@ -95,7 +95,7 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient {
GetHelper(service_path)->CallVoidMethod(&method_call, callback);
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void Connect(const dbus::ObjectPath& service_path,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
@@ -105,7 +105,7 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient {
&method_call, callback, error_callback);
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void Disconnect(const dbus::ObjectPath& service_path,
const VoidDBusMethodCallback& callback) OVERRIDE {
dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface,
@@ -113,7 +113,7 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient {
GetHelper(service_path)->CallVoidMethod(&method_call, callback);
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void Remove(const dbus::ObjectPath& service_path,
const VoidDBusMethodCallback& callback) OVERRIDE {
dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface,
@@ -121,7 +121,7 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient {
GetHelper(service_path)->CallVoidMethod(&method_call, callback);
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void ActivateCellularModem(
const dbus::ObjectPath& service_path,
const std::string& carrier,
@@ -133,7 +133,7 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient {
GetHelper(service_path)->CallVoidMethod(&method_call, callback);
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual bool CallActivateCellularModemAndBlock(
const dbus::ObjectPath& service_path,
const std::string& carrier) OVERRIDE {
@@ -145,10 +145,10 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient {
}
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& service_path) {
+ // Returns the corresponding ShillClientHelper for the profile.
+ ShillClientHelper* GetHelper(const dbus::ObjectPath& service_path) {
HelperMap::iterator it = helpers_.find(service_path.value());
if (it != helpers_.end())
return it->second;
@@ -156,7 +156,7 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient {
// There is no helper for the profile, create it.
dbus::ObjectProxy* object_proxy =
bus_->GetObjectProxy(flimflam::kFlimflamServiceName, service_path);
- FlimflamClientHelper* helper = new FlimflamClientHelper(bus_, object_proxy);
+ ShillClientHelper* helper = new ShillClientHelper(bus_, object_proxy);
helper->MonitorPropertyChanged(flimflam::kFlimflamServiceInterface);
helpers_.insert(HelperMap::value_type(service_path.value(), helper));
return helper;
@@ -166,36 +166,36 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient {
HelperMap helpers_;
STLValueDeleter<HelperMap> helpers_deleter_;
- DISALLOW_COPY_AND_ASSIGN(FlimflamServiceClientImpl);
+ DISALLOW_COPY_AND_ASSIGN(ShillServiceClientImpl);
};
-// A stub implementation of FlimflamServiceClient.
-class FlimflamServiceClientStubImpl : public FlimflamServiceClient {
+// A stub implementation of ShillServiceClient.
+class ShillServiceClientStubImpl : public ShillServiceClient {
public:
- FlimflamServiceClientStubImpl() : weak_ptr_factory_(this) {}
+ ShillServiceClientStubImpl() : weak_ptr_factory_(this) {}
- virtual ~FlimflamServiceClientStubImpl() {}
+ virtual ~ShillServiceClientStubImpl() {}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void SetPropertyChangedHandler(
const dbus::ObjectPath& service_path,
const PropertyChangedHandler& handler) OVERRIDE {}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void ResetPropertyChangedHandler(
const dbus::ObjectPath& service_path) OVERRIDE {}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void GetProperties(const dbus::ObjectPath& service_path,
const DictionaryValueCallback& callback) OVERRIDE {
MessageLoop::current()->PostTask(
FROM_HERE,
- base::Bind(&FlimflamServiceClientStubImpl::PassEmptyDictionaryValue,
+ base::Bind(&ShillServiceClientStubImpl::PassEmptyDictionaryValue,
weak_ptr_factory_.GetWeakPtr(),
callback));
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void SetProperty(const dbus::ObjectPath& service_path,
const std::string& name,
const base::Value& value,
@@ -203,33 +203,33 @@ class FlimflamServiceClientStubImpl : public FlimflamServiceClient {
PostSuccessVoidCallback(callback);
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void ClearProperty(const dbus::ObjectPath& service_path,
const std::string& name,
const VoidDBusMethodCallback& callback) OVERRIDE {
PostSuccessVoidCallback(callback);
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void Connect(const dbus::ObjectPath& service_path,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE {
MessageLoop::current()->PostTask(FROM_HERE, callback);
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void Disconnect(const dbus::ObjectPath& service_path,
const VoidDBusMethodCallback& callback) OVERRIDE {
PostSuccessVoidCallback(callback);
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void Remove(const dbus::ObjectPath& service_path,
const VoidDBusMethodCallback& callback) OVERRIDE {
PostSuccessVoidCallback(callback);
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual void ActivateCellularModem(
const dbus::ObjectPath& service_path,
const std::string& carrier,
@@ -237,7 +237,7 @@ class FlimflamServiceClientStubImpl : public FlimflamServiceClient {
PostSuccessVoidCallback(callback);
}
- // FlimflamServiceClient override.
+ // ShillServiceClient override.
virtual bool CallActivateCellularModemAndBlock(
const dbus::ObjectPath& service_path,
const std::string& carrier) OVERRIDE {
@@ -259,25 +259,25 @@ class FlimflamServiceClientStubImpl : public FlimflamServiceClient {
// 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<FlimflamServiceClientStubImpl> weak_ptr_factory_;
+ base::WeakPtrFactory<ShillServiceClientStubImpl> weak_ptr_factory_;
- DISALLOW_COPY_AND_ASSIGN(FlimflamServiceClientStubImpl);
+ DISALLOW_COPY_AND_ASSIGN(ShillServiceClientStubImpl);
};
} // namespace
-FlimflamServiceClient::FlimflamServiceClient() {}
+ShillServiceClient::ShillServiceClient() {}
-FlimflamServiceClient::~FlimflamServiceClient() {}
+ShillServiceClient::~ShillServiceClient() {}
// static
-FlimflamServiceClient* FlimflamServiceClient::Create(
+ShillServiceClient* ShillServiceClient::Create(
DBusClientImplementationType type,
dbus::Bus* bus) {
if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
- return new FlimflamServiceClientImpl(bus);
+ return new ShillServiceClientImpl(bus);
DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
- return new FlimflamServiceClientStubImpl();
+ return new ShillServiceClientStubImpl();
}
} // namespace chromeos
« no previous file with comments | « chromeos/dbus/shill_service_client.h ('k') | chromeos/dbus/shill_service_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698