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

Unified Diff: dbus/object_proxy.h

Issue 8536007: dbus: Add ObjectProxy::EmptyResponseCallback(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 9 years, 1 month 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 | « dbus/end_to_end_async_unittest.cc ('k') | dbus/object_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/object_proxy.h
diff --git a/dbus/object_proxy.h b/dbus/object_proxy.h
index 5fc41979a8faa3d70794fbf6352a9b6323fb425c..484f107890c94b4f7c6f867d9a39a21040346cf8 100644
--- a/dbus/object_proxy.h
+++ b/dbus/object_proxy.h
@@ -73,7 +73,9 @@ class ObjectProxy : public base::RefCountedThreadSafe<ObjectProxy> {
// |callback| will be called in the origin thread, once the method call
// is complete. As it's called in the origin thread, |callback| can
// safely reference objects in the origin thread (i.e. UI thread in most
- // cases).
+ // cases). If the caller is not interested in the response from the
+ // method (i.e. calling a method that does not return a value),
+ // EmptyResponseCallback() can be passed to the |callback| parameter.
//
// If the method call is successful, a pointer to Response object will
// be passed to the callback. If unsuccessful, NULL will be passed to
@@ -106,6 +108,10 @@ class ObjectProxy : public base::RefCountedThreadSafe<ObjectProxy> {
// BLOCKING CALL.
virtual void Detach();
+ // Returns an empty callback that does nothing. Can be used for
+ // CallMethod().
+ static ResponseCallback EmptyResponseCallback();
+
protected:
// This is protected, so we can define sub classes.
virtual ~ObjectProxy();
« no previous file with comments | « dbus/end_to_end_async_unittest.cc ('k') | dbus/object_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698