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/message_pipe.h

Issue 259373003: Mojo: Minor cleanup (of message_in_transit.cc and message_pipe.*). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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_in_transit.cc ('k') | mojo/system/message_pipe.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/message_pipe.h
diff --git a/mojo/system/message_pipe.h b/mojo/system/message_pipe.h
index 6392ab3530391c79303b29607d6b65a17ca32595..7fef65bdc5b10822c256d7bf4b418dec51d11126 100644
--- a/mojo/system/message_pipe.h
+++ b/mojo/system/message_pipe.h
@@ -71,14 +71,11 @@ class MOJO_SYSTEM_IMPL_EXPORT MessagePipe :
// endpoint.
void ConvertLocalToProxy(unsigned port);
- // This is used internally by |WriteMessage()| and by |Channel| to enqueue
- // messages (typically to a |LocalMessagePipeEndpoint|). Unlike
- // |WriteMessage()|, |port| is the *destination* port. |transports| should be
- // non-null only if it's nonempty, and only if |message| has no dispatchers
- // attached.
+ // This is used by |Channel| to enqueue messages (typically to a
+ // |LocalMessagePipeEndpoint|). Unlike |WriteMessage()|, |port| is the
+ // *destination* port.
MojoResult EnqueueMessage(unsigned port,
- scoped_ptr<MessageInTransit> message,
- std::vector<DispatcherTransport>* transports);
+ scoped_ptr<MessageInTransit> message);
// These are used by |Channel|.
bool Attach(unsigned port,
@@ -91,8 +88,22 @@ class MOJO_SYSTEM_IMPL_EXPORT MessagePipe :
friend class base::RefCountedThreadSafe<MessagePipe>;
virtual ~MessagePipe();
- // Used by |EnqueueMessage()| to handle control messages that are actually
- // meant for us.
+ // This is used internally by |WriteMessage()| and by |EnqueueMessage()|.
+ // |transports| may be non-null only if it's nonempty and |message| has no
+ // dispatchers attached.
+ MojoResult EnqueueMessageInternal(
+ unsigned port,
+ scoped_ptr<MessageInTransit> message,
+ std::vector<DispatcherTransport>* transports);
+
+ // Helper for |EnqueueMessageInternal()|. Must be called with |lock_| held.
+ MojoResult AttachTransportsNoLock(
+ unsigned port,
+ MessageInTransit* message,
+ std::vector<DispatcherTransport>* transports);
+
+ // Used by |EnqueueMessageInternal()| to handle control messages that are
+ // actually meant for us.
MojoResult HandleControlMessage(unsigned port,
scoped_ptr<MessageInTransit> message);
« no previous file with comments | « mojo/system/message_in_transit.cc ('k') | mojo/system/message_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698