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

Unified Diff: mojo/public/cpp/bindings/thread_safe_interface_ptr.h

Issue 2766523002: mojo: MessageReceiver*::AcceptWithResponder() now take a unique_ptr to the responder (Closed)
Patch Set: comments Created 3 years, 9 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: mojo/public/cpp/bindings/thread_safe_interface_ptr.h
diff --git a/mojo/public/cpp/bindings/thread_safe_interface_ptr.h b/mojo/public/cpp/bindings/thread_safe_interface_ptr.h
index bab6d22cbdef4f7a40f1f25c7c0bae68cc67c9f5..8b32b30b4fbefe1a5a07e1bb089b97e337d9be74 100644
--- a/mojo/public/cpp/bindings/thread_safe_interface_ptr.h
+++ b/mojo/public/cpp/bindings/thread_safe_interface_ptr.h
@@ -73,16 +73,17 @@ class ThreadSafeForwarder : public MessageReceiverWithResponder {
return true;
}
- bool AcceptWithResponder(Message* message,
- MessageReceiver* response_receiver) override {
+ bool AcceptWithResponder(
+ Message* message,
+ std::unique_ptr<MessageReceiver> response_receiver) override {
if (!message->associated_endpoint_handles()->empty()) {
// Please see comment for the DCHECK in the previous method.
DCHECK(associated_group_.GetController());
message->SerializeAssociatedEndpointHandles(
associated_group_.GetController());
}
- auto responder = base::MakeUnique<ForwardToCallingThread>(
- base::WrapUnique(response_receiver));
+ auto responder =
+ base::MakeUnique<ForwardToCallingThread>(std::move(response_receiver));
task_runner_->PostTask(
FROM_HERE, base::Bind(forward_with_responder_, base::Passed(message),
base::Passed(&responder)));

Powered by Google App Engine
This is Rietveld 408576698