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

Unified Diff: dbus/exported_object.h

Issue 12092061: Code cleaning: Uses scoped_ptr<> to express ownership rather than writing ownership in comments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
Index: dbus/exported_object.h
diff --git a/dbus/exported_object.h b/dbus/exported_object.h
index 4e74ddbca84c3cca736be1e94eea349fa3dcc414..958533836315bcb6eacdb913a491b435ce512f79 100644
--- a/dbus/exported_object.h
+++ b/dbus/exported_object.h
@@ -44,9 +44,7 @@ class CHROME_DBUS_EXPORT ExportedObject
//
// ResponseSender takes ownership of |response| hence client code should
// not delete |response|.
satorux1 2013/01/30 06:36:58 Please remove the line 44-46. The comment is no lo
alias of yukishiino 2013/01/30 13:13:44 Done.
- // TODO(satorux): Change this to take scoped_ptr<Response> to make
- // ownership clearer. crbug.com/163231
- typedef base::Callback<void (Response* response)> ResponseSender;
+ typedef base::Callback<void (scoped_ptr<Response> response)> ResponseSender;
// Called when an exported method is called. |method_call| is the request
// message. |sender| is the callback that's used to send a response.
@@ -134,20 +132,20 @@ class CHROME_DBUS_EXPORT ExportedObject
// Runs the method. Helper function for HandleMessage().
void RunMethod(MethodCallCallback method_call_callback,
- MethodCall* method_call,
+ scoped_ptr<MethodCall> method_call,
base::TimeTicks start_time);
// Callback invoked by service provider to send a response to a method call.
// Can be called immediately from a MethodCallCallback to implement a
// synchronous service or called later to implement an asynchronous service.
void SendResponse(base::TimeTicks start_time,
- MethodCall* method_call,
- Response* response);
+ scoped_ptr<MethodCall> method_call,
+ scoped_ptr<Response> response);
// Called on completion of the method run from SendResponse().
// Takes ownership of |method_call| and |response|.
- void OnMethodCompleted(MethodCall* method_call,
- Response* response,
+ void OnMethodCompleted(scoped_ptr<MethodCall> method_call,
+ scoped_ptr<Response> response,
base::TimeTicks start_time);
// Called when the object is unregistered.

Powered by Google App Engine
This is Rietveld 408576698