Index: chromeos/dbus/shill_device_client.cc |
diff --git a/chromeos/dbus/shill_device_client.cc b/chromeos/dbus/shill_device_client.cc |
index eda7c41ac05451ee38c74579a4cd449fbcc48c06..38c346ed999f13dc4d0e210b3dec99d792fff073 100644 |
--- a/chromeos/dbus/shill_device_client.cc |
+++ b/chromeos/dbus/shill_device_client.cc |
@@ -65,13 +65,16 @@ class ShillDeviceClientImpl : public ShillDeviceClient { |
virtual void SetProperty(const dbus::ObjectPath& device_path, |
const std::string& name, |
const base::Value& value, |
- const VoidDBusMethodCallback& callback) OVERRIDE { |
+ const base::Closure& callback, |
+ const ErrorCallback& error_callback) OVERRIDE { |
dbus::MethodCall method_call(flimflam::kFlimflamDeviceInterface, |
flimflam::kSetPropertyFunction); |
dbus::MessageWriter writer(&method_call); |
writer.AppendString(name); |
ShillClientHelper::AppendValueDataAsVariant(&writer, value); |
- GetHelper(device_path)->CallVoidMethod(&method_call, callback); |
+ GetHelper(device_path)->CallVoidMethodWithErrorCallback(&method_call, |
+ callback, |
+ error_callback); |
} |
virtual void ClearProperty(const dbus::ObjectPath& device_path, |
@@ -87,7 +90,7 @@ class ShillDeviceClientImpl : public ShillDeviceClient { |
virtual void AddIPConfig( |
const dbus::ObjectPath& device_path, |
const std::string& method, |
- const ObjectPathDBusMethodCallback& callback) OVERRIDE { |
+ const ObjectPathCallback& callback) OVERRIDE { |
dbus::MethodCall method_call(flimflam::kFlimflamDeviceInterface, |
flimflam::kAddIPConfigFunction); |
dbus::MessageWriter writer(&method_call); |
@@ -282,14 +285,20 @@ class ShillDeviceClientStubImpl : public ShillDeviceClient { |
virtual void SetProperty(const dbus::ObjectPath& device_path, |
const std::string& name, |
const base::Value& value, |
- const VoidDBusMethodCallback& callback) OVERRIDE { |
+ const base::Closure& callback, |
+ const ErrorCallback& error_callback) OVERRIDE { |
base::DictionaryValue* device_properties = NULL; |
if (!stub_devices_.GetDictionary(device_path.value(), &device_properties)) { |
- PostVoidCallback(callback, DBUS_METHOD_CALL_FAILURE); |
+ std::string error_name("org.chromium.flimflam.Error.Failure"); |
+ std::string error_message("Failed"); |
+ MessageLoop::current()->PostTask(FROM_HERE, |
+ base::Bind(error_callback, |
+ error_name, |
+ error_message)); |
return; |
} |
device_properties->Set(name, value.DeepCopy()); |
- PostVoidCallback(callback, DBUS_METHOD_CALL_SUCCESS); |
+ MessageLoop::current()->PostTask(FROM_HERE, callback); |
} |
// ShillDeviceClient override. |
@@ -309,7 +318,7 @@ class ShillDeviceClientStubImpl : public ShillDeviceClient { |
virtual void AddIPConfig( |
const dbus::ObjectPath& device_path, |
const std::string& method, |
- const ObjectPathDBusMethodCallback& callback) OVERRIDE { |
+ const ObjectPathCallback& callback) OVERRIDE { |
MessageLoop::current()->PostTask(FROM_HERE, |
base::Bind(callback, |
DBUS_METHOD_CALL_SUCCESS, |