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

Unified Diff: mojo/system/message_pipe_dispatcher.cc

Issue 591573002: Mojo: Remove Channel::AttachMessagePipeEndpoint(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/channel_unittest.cc ('k') | mojo/system/message_pipe_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/message_pipe_dispatcher.cc
diff --git a/mojo/system/message_pipe_dispatcher.cc b/mojo/system/message_pipe_dispatcher.cc
index f61ec6c8d737177f53773d011588e9489774ff0d..c515a00067f8c551b80f906ffa26610f7cfd30bb 100644
--- a/mojo/system/message_pipe_dispatcher.cc
+++ b/mojo/system/message_pipe_dispatcher.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "mojo/system/channel.h"
+#include "mojo/system/channel_endpoint.h"
#include "mojo/system/constants.h"
#include "mojo/system/local_message_pipe_endpoint.h"
#include "mojo/system/memory.h"
@@ -116,7 +117,8 @@ scoped_refptr<MessagePipeDispatcher> MessagePipeDispatcher::Deserialize(
return scoped_refptr<MessagePipeDispatcher>();
}
MessageInTransit::EndpointId local_id =
- channel->AttachMessagePipeEndpoint(remote_message_pipe.second, 1);
+ channel->AttachEndpoint(make_scoped_refptr(
+ new ChannelEndpoint(remote_message_pipe.second.get(), 1)));
if (local_id == MessageInTransit::kInvalidEndpointId) {
LOG(ERROR) << "Failed to deserialize message pipe dispatcher (failed to "
"attach; remote ID = " << remote_id << ")";
@@ -249,8 +251,8 @@ bool MessagePipeDispatcher::EndSerializeAndCloseImplNoLock(
message_pipe_->ConvertLocalToProxy(port_);
// Attach the new proxy endpoint to the channel.
- MessageInTransit::EndpointId endpoint_id =
- channel->AttachMessagePipeEndpoint(message_pipe_, port_);
+ MessageInTransit::EndpointId endpoint_id = channel->AttachEndpoint(
+ make_scoped_refptr(new ChannelEndpoint(message_pipe_.get(), port_)));
// Note: It's okay to get an endpoint ID of |kInvalidEndpointId|. (It's
// possible that the other endpoint -- the one that we're not sending -- was
// closed in the intervening time.) In that case, we need to deserialize a
« no previous file with comments | « mojo/system/channel_unittest.cc ('k') | mojo/system/message_pipe_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698