From 21d97c7299455296b91571683c286b3acfb76fb5 Mon Sep 17 00:00:00 2001 From: "viettrungluu@chromium.org" Date: Wed, 29 Jan 2014 22:19:58 +0000 Subject: Mojo: Refactor some message pipe stuff. Move handling of dispatchers when enqueueing messages into the endpoint code. That handling will need to be very specific to the type of endpoint. R=darin@chromium.org Review URL: https://codereview.chromium.org/147983009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247753 0039d316-1c4b-4281-b951-d872f2087c98 --- mojo/system/message_pipe_endpoint.h | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'mojo/system/message_pipe_endpoint.h') diff --git a/mojo/system/message_pipe_endpoint.h b/mojo/system/message_pipe_endpoint.h index 835b966..4825b37 100644 --- a/mojo/system/message_pipe_endpoint.h +++ b/mojo/system/message_pipe_endpoint.h @@ -37,20 +37,11 @@ class MOJO_SYSTEM_IMPL_EXPORT MessagePipeEndpoint { // All implementations must implement these. virtual void Close() = 0; virtual void OnPeerClose() = 0; - // Checks if |EnqueueMessage()| will be able to enqueue the given message - // (with the given set of dispatchers). |dispatchers| should be non-null only - // if it's nonempty. Returns |MOJO_RESULT_OK| if it will and an appropriate - // error code if it won't. - virtual MojoResult CanEnqueueMessage( - const MessageInTransit* message, - const std::vector* dispatchers) = 0; - // Takes ownership of |message| and the contents of |dispatchers| (leaving - // it empty). This should only be called after |CanEnqueueMessage()| has - // indicated success. (Unlike |CanEnqueueMessage()|, |dispatchers| may be - // non-null but empty.) - virtual void EnqueueMessage( + // Implements |MessagePipe::EnqueueMessage()| (see its description for + // details). + virtual MojoResult EnqueueMessage( MessageInTransit* message, - std::vector >* dispatchers) = 0; + const std::vector* dispatchers) = 0; // Implementations must override these if they represent a local endpoint, // i.e., one for which there's a |MessagePipeDispatcher| (and thus a handle). -- cgit v1.1