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

Unified Diff: mojo/system/proxy_message_pipe_endpoint.h

Issue 604443002: Mojo: Remove ProxyMessagePipeEndpoint::OnRemove(), etc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@del_pmpe_run-x-del_mp_attach-x-move_paused_message_queue-x-del_pmpe_attach
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_endpoint.cc ('k') | mojo/system/proxy_message_pipe_endpoint.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/proxy_message_pipe_endpoint.h
diff --git a/mojo/system/proxy_message_pipe_endpoint.h b/mojo/system/proxy_message_pipe_endpoint.h
index d0150547ad737241d447b55636fd1953d9f6cd2e..b6f8db4b9508d8f475b383dc5c03d65374f08433 100644
--- a/mojo/system/proxy_message_pipe_endpoint.h
+++ b/mojo/system/proxy_message_pipe_endpoint.h
@@ -18,21 +18,15 @@ class ChannelEndpoint;
class LocalMessagePipeEndpoint;
class MessagePipe;
-// A |ProxyMessagePipeEndpoint| connects an end of a |MessagePipe| to a
-// |Channel|, over which it transmits and receives data (to/from another
-// |ProxyMessagePipeEndpoint|). So a |MessagePipe| with one endpoint local and
-// the other endpoint remote consists of a |LocalMessagePipeEndpoint| and a
+// A |ProxyMessagePipeEndpoint| is an endpoint which delegates everything to a
+// |ChannelEndpoint|, which may be co-owned by a |Channel|. Like any
+// |MessagePipeEndpoint|, a |ProxyMessagePipeEndpoint| is owned by a
+// |MessagePipe|.
+//
+// For example, a |MessagePipe| with one endpoint local and the other endpoint
+// remote consists of a |LocalMessagePipeEndpoint| and a
// |ProxyMessagePipeEndpoint|, with only the local endpoint being accessible via
// a |MessagePipeDispatcher|.
-//
-// Like any |MessagePipeEndpoint|, a |ProxyMessagePipeEndpoint| is owned by a
-// |MessagePipe|.
-// - A |ProxyMessagePipeEndpoint| starts out *detached*, i.e., not associated
-// to any |Channel|. When *attached*, it gets a reference to a |Channel| and
-// is assigned a local ID. A |ProxyMessagePipeEndpoint| must be detached
-// before destruction; this is done inside |Close()|.
-// - When attached, a |ProxyMessagePipeEndpoint| starts out not running. When
-// run, it gets a remote ID.
class MOJO_SYSTEM_IMPL_EXPORT ProxyMessagePipeEndpoint
: public MessagePipeEndpoint {
public:
@@ -43,15 +37,8 @@ class MOJO_SYSTEM_IMPL_EXPORT ProxyMessagePipeEndpoint
virtual Type GetType() const OVERRIDE;
virtual bool OnPeerClose() OVERRIDE;
virtual void EnqueueMessage(scoped_ptr<MessageInTransit> message) OVERRIDE;
- virtual void OnRemove() OVERRIDE;
private:
- void Detach();
-
- // TODO(vtl): Get rid of this.
- bool is_attached() const { return !!channel_endpoint_.get(); }
-
- // This should only be set if we're attached.
scoped_refptr<ChannelEndpoint> channel_endpoint_;
DISALLOW_COPY_AND_ASSIGN(ProxyMessagePipeEndpoint);
« no previous file with comments | « mojo/system/message_pipe_endpoint.cc ('k') | mojo/system/proxy_message_pipe_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698