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

Unified Diff: mojo/system/message_pipe.cc

Issue 585093002: Mojo: Make MessagePipe::ConvertLocalToProxy() create the ChannelEndpoint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_attachmpe
Patch Set: rebased Created 6 years, 3 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 | « mojo/system/message_pipe.h ('k') | mojo/system/message_pipe_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/message_pipe.cc
diff --git a/mojo/system/message_pipe.cc b/mojo/system/message_pipe.cc
index 2cff5df77e1bd56401dafdafab6d3d412b411c20..872ed30211814250feb44878eab60bdae9329138 100644
--- a/mojo/system/message_pipe.cc
+++ b/mojo/system/message_pipe.cc
@@ -5,6 +5,7 @@
#include "mojo/system/message_pipe.h"
#include "base/logging.h"
+#include "mojo/system/channel_endpoint.h"
#include "mojo/system/local_message_pipe_endpoint.h"
#include "mojo/system/message_in_transit.h"
#include "mojo/system/message_pipe_dispatcher.h"
@@ -145,7 +146,7 @@ void MessagePipe::RemoveWaiter(unsigned port,
endpoints_[port]->RemoveWaiter(waiter, signals_state);
}
-void MessagePipe::ConvertLocalToProxy(unsigned port) {
+scoped_refptr<ChannelEndpoint> MessagePipe::ConvertLocalToProxy(unsigned port) {
DCHECK(port == 0 || port == 1);
base::AutoLock locker(lock_);
@@ -169,6 +170,8 @@ void MessagePipe::ConvertLocalToProxy(unsigned port) {
static_cast<LocalMessagePipeEndpoint*>(endpoints_[port].get()),
is_peer_open));
endpoints_[port].swap(replacement_endpoint);
+
+ return make_scoped_refptr(new ChannelEndpoint(this, port));
}
MojoResult MessagePipe::EnqueueMessage(unsigned port,
« no previous file with comments | « mojo/system/message_pipe.h ('k') | mojo/system/message_pipe_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698