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

Unified Diff: mojo/edk/system/channel_endpoint.h

Issue 694923002: Update mojo sdk to rev 91d94d6993c9b0c4135a95687a7d541ce90629b (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/application_manager/application_manager.cc ('k') | mojo/edk/system/channel_endpoint.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/channel_endpoint.h
diff --git a/mojo/edk/system/channel_endpoint.h b/mojo/edk/system/channel_endpoint.h
index 5953ce58ee9681134226afc7a28fd88b0f2ed900..377599d1fc17b1b78ea5628f2f54dfa237d851a3 100644
--- a/mojo/edk/system/channel_endpoint.h
+++ b/mojo/edk/system/channel_endpoint.h
@@ -112,13 +112,17 @@ class MessagePipe;
class MOJO_SYSTEM_IMPL_EXPORT ChannelEndpoint
: public base::RefCountedThreadSafe<ChannelEndpoint> {
public:
- // TODO(vtl): More comments....
- ChannelEndpoint(MessagePipe* message_pipe, unsigned port);
-
- // Takes messages from the given |MessageInTransitQueue|. This must be called
- // before this object is attached to a channel, and before anyone has a chance
- // to enqueue any messages.
- void TakeMessages(MessageInTransitQueue* message_queue);
+ // Constructor for a |ChannelEndpoint| attached to the given message pipe
+ // endpoint (specified by |message_pipe| and |port|). Optionally takes
+ // messages from |*message_queue| if |message_queue| is non-null.
+ //
+ // |message_pipe| may be null if this endpoint will never need to receive
+ // messages, in which case |message_queue| should not be null. In that case,
+ // this endpoint will simply send queued messages upon being attached to a
+ // |Channel| and immediately detach itself.
+ ChannelEndpoint(MessagePipe* message_pipe,
+ unsigned port,
+ MessageInTransitQueue* message_queue = nullptr);
// Methods called by |MessagePipe| (via |ProxyMessagePipeEndpoint|):
@@ -158,7 +162,6 @@ class MOJO_SYSTEM_IMPL_EXPORT ChannelEndpoint
// Must be called with |lock_| held.
bool WriteMessageNoLock(scoped_ptr<MessageInTransit> message);
- // TODO(vtl): Move the things above under lock.
// Protects the members below.
base::Lock lock_;
« no previous file with comments | « mojo/application_manager/application_manager.cc ('k') | mojo/edk/system/channel_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698