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

Unified Diff: chromeos/dbus/flimflam_service_client.cc

Issue 10170020: Rework chromeos::FlimflamDevice/ServiceClient with CallMethodWithErrorCallback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 8 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/flimflam_service_client.h ('k') | chromeos/dbus/flimflam_service_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/flimflam_service_client.cc
diff --git a/chromeos/dbus/flimflam_service_client.cc b/chromeos/dbus/flimflam_service_client.cc
index 40ff77e8a6f59c0e3dc96abb6dfbe635d5a46281..ec8e1c92b54eca84ed6d3251f19a622d6a656ad7 100644
--- a/chromeos/dbus/flimflam_service_client.cc
+++ b/chromeos/dbus/flimflam_service_client.cc
@@ -73,10 +73,12 @@ class FlimflamServiceClientImpl : public FlimflamServiceClient {
// FlimflamServiceClient override.
virtual void Connect(const dbus::ObjectPath& service_path,
- const VoidCallback& callback) OVERRIDE {
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) OVERRIDE {
dbus::MethodCall method_call(flimflam::kFlimflamServiceInterface,
flimflam::kConnectFunction);
- GetHelper(service_path)->CallVoidMethod(&method_call, callback);
+ GetHelper(service_path)->CallVoidMethodWithErrorCallback(
+ &method_call, callback, error_callback);
}
// FlimflamServiceClient override.
@@ -174,8 +176,9 @@ class FlimflamServiceClientStubImpl : public FlimflamServiceClient {
// FlimflamServiceClient override.
virtual void Connect(const dbus::ObjectPath& service_path,
- const VoidCallback& callback) OVERRIDE {
- PostSuccessVoidCallback(callback);
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) OVERRIDE {
+ MessageLoop::current()->PostTask(FROM_HERE, callback);
}
// FlimflamServiceClient override.
« no previous file with comments | « chromeos/dbus/flimflam_service_client.h ('k') | chromeos/dbus/flimflam_service_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698