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

Unified Diff: mojo/system/message_pipe.cc

Issue 596363003: Mojo: Remove ProxyMessagePipeEndpoint::Run(), etc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@del_mp_attach-x-move_paused_message_queue-x-del_pmpe_attach
Patch Set: remove unused vars 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_endpoint.h » ('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 c7acbe692118e43d23220522eb741bb12a62b783..ed73c0c6be41c00dc8fe6142199ae9349265b55c 100644
--- a/mojo/system/message_pipe.cc
+++ b/mojo/system/message_pipe.cc
@@ -158,13 +158,11 @@ scoped_refptr<ChannelEndpoint> MessagePipe::ConvertLocalToProxy(unsigned port) {
DCHECK(endpoints_[port]);
DCHECK_EQ(endpoints_[port]->GetType(), MessagePipeEndpoint::kTypeLocal);
- bool is_peer_open = !!endpoints_[GetPeerPort(port)];
-
// TODO(vtl): Allowing this case is a temporary hack. It'll set up a
// |MessagePipe| with two proxy endpoints, which will then act as a proxy
// (rather than trying to connect the two ends directly).
DLOG_IF(WARNING,
- is_peer_open &&
+ !!endpoints_[GetPeerPort(port)] &&
endpoints_[GetPeerPort(port)]->GetType() !=
MessagePipeEndpoint::kTypeLocal)
<< "Direct message pipe passing across multiple channels not yet "
@@ -173,8 +171,7 @@ scoped_refptr<ChannelEndpoint> MessagePipe::ConvertLocalToProxy(unsigned port) {
scoped_ptr<MessagePipeEndpoint> old_endpoint(endpoints_[port].Pass());
scoped_refptr<ChannelEndpoint> channel_endpoint(
new ChannelEndpoint(this, port));
- endpoints_[port].reset(
- new ProxyMessagePipeEndpoint(channel_endpoint.get(), is_peer_open));
+ endpoints_[port].reset(new ProxyMessagePipeEndpoint(channel_endpoint.get()));
channel_endpoint->TakeMessages(static_cast<LocalMessagePipeEndpoint*>(
old_endpoint.get())->message_queue());
old_endpoint->Close();
@@ -187,15 +184,6 @@ MojoResult MessagePipe::EnqueueMessage(unsigned port,
return EnqueueMessageInternal(port, message.Pass(), nullptr);
}
-void MessagePipe::Run(unsigned port) {
- DCHECK(port == 0 || port == 1);
-
- base::AutoLock locker(lock_);
- DCHECK(endpoints_[port]);
- if (!endpoints_[port]->Run())
- endpoints_[port].reset();
-}
-
void MessagePipe::OnRemove(unsigned port) {
unsigned destination_port = GetPeerPort(port);
« no previous file with comments | « mojo/system/message_pipe.h ('k') | mojo/system/message_pipe_endpoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698