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

Unified Diff: mojo/system/proxy_message_pipe_endpoint.cc

Issue 577313002: Mojo: Give ChannelEndpoint the remote ID and ProxyMessagePipeEndpoint the ChannelEndpoint. (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/proxy_message_pipe_endpoint.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/proxy_message_pipe_endpoint.cc
diff --git a/mojo/system/proxy_message_pipe_endpoint.cc b/mojo/system/proxy_message_pipe_endpoint.cc
index 81adda545052764e760da686d0ba0c75ed3da44a..9f8e7f36ba3bcf0cb626badcbd6e16ab5b00f56e 100644
--- a/mojo/system/proxy_message_pipe_endpoint.cc
+++ b/mojo/system/proxy_message_pipe_endpoint.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "mojo/system/channel.h"
+#include "mojo/system/channel_endpoint.h"
#include "mojo/system/local_message_pipe_endpoint.h"
#include "mojo/system/message_pipe_dispatcher.h"
@@ -81,14 +82,17 @@ void ProxyMessagePipeEndpoint::EnqueueMessage(
}
}
-void ProxyMessagePipeEndpoint::Attach(scoped_refptr<Channel> channel,
+void ProxyMessagePipeEndpoint::Attach(ChannelEndpoint* channel_endpoint,
+ Channel* channel,
MessageInTransit::EndpointId local_id) {
- DCHECK(channel.get());
+ DCHECK(channel_endpoint);
+ DCHECK(channel);
DCHECK_NE(local_id, MessageInTransit::kInvalidEndpointId);
DCHECK(!is_attached());
AssertConsistentState();
+ channel_endpoint_ = channel_endpoint;
channel_ = channel;
local_id_ = local_id;
AssertConsistentState();
@@ -127,6 +131,8 @@ void ProxyMessagePipeEndpoint::Detach() {
AssertConsistentState();
channel_->DetachMessagePipeEndpoint(local_id_, remote_id_);
channel_ = NULL;
+ // TODO(vtl): Inform |channel_endpoint_| that we were detached.
+ channel_endpoint_ = NULL;
local_id_ = MessageInTransit::kInvalidEndpointId;
remote_id_ = MessageInTransit::kInvalidEndpointId;
paused_message_queue_.Clear();
« no previous file with comments | « mojo/system/proxy_message_pipe_endpoint.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698