diff options
author | rockot <rockot@chromium.org> | 2014-12-02 02:48:08 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-02 10:49:17 +0000 |
commit | 48847895beb5eb7da6e25d0d21e72a57a6d6d0a7 (patch) | |
tree | 380c73a4756bff4188af25ba0df924e78689faf9 /mojo/edk/system/channel_endpoint.cc | |
parent | 5affb709cd2953c5c0c4c2db97da420851ab31cb (diff) | |
download | chromium_src-48847895beb5eb7da6e25d0d21e72a57a6d6d0a7.zip chromium_src-48847895beb5eb7da6e25d0d21e72a57a6d6d0a7.tar.gz chromium_src-48847895beb5eb7da6e25d0d21e72a57a6d6d0a7.tar.bz2 |
Update mojo sdk to rev 98d8236f7eea383e5214254c8d045df6c7a6297a
BUG=435144
TBR=jamesr@chromium.org
TBR=dalecurtis@chromium.org for media test update
Review URL: https://codereview.chromium.org/769753003
Cr-Commit-Position: refs/heads/master@{#306367}
Diffstat (limited to 'mojo/edk/system/channel_endpoint.cc')
-rw-r--r-- | mojo/edk/system/channel_endpoint.cc | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/mojo/edk/system/channel_endpoint.cc b/mojo/edk/system/channel_endpoint.cc index ca86b5f..a8bbbb2 100644 --- a/mojo/edk/system/channel_endpoint.cc +++ b/mojo/edk/system/channel_endpoint.cc @@ -7,7 +7,6 @@ #include "base/logging.h" #include "mojo/edk/system/channel.h" #include "mojo/edk/system/channel_endpoint_client.h" -#include "mojo/edk/system/transport_data.h" namespace mojo { namespace system { @@ -19,7 +18,7 @@ ChannelEndpoint::ChannelEndpoint(ChannelEndpointClient* client, DCHECK(client_.get() || message_queue); if (message_queue) - paused_message_queue_.Swap(message_queue); + channel_message_queue_.Swap(message_queue); } bool ChannelEndpoint::EnqueueMessage(scoped_ptr<MessageInTransit> message) { @@ -33,7 +32,7 @@ bool ChannelEndpoint::EnqueueMessage(scoped_ptr<MessageInTransit> message) { // some reason (with live message pipes on it). Ideally, we'd return false // (and not enqueue the message), but we currently don't have a way to check // this. - paused_message_queue_.AddMessage(message.Pass()); + channel_message_queue_.AddMessage(message.Pass()); return true; } @@ -72,8 +71,8 @@ void ChannelEndpoint::AttachAndRun(Channel* channel, local_id_ = local_id; remote_id_ = remote_id; - while (!paused_message_queue_.IsEmpty()) { - LOG_IF(WARNING, !WriteMessageNoLock(paused_message_queue_.GetMessage())) + while (!channel_message_queue_.IsEmpty()) { + LOG_IF(WARNING, !WriteMessageNoLock(channel_message_queue_.GetMessage())) << "Failed to write enqueue message to channel"; } @@ -85,10 +84,7 @@ void ChannelEndpoint::AttachAndRun(Channel* channel, } } -bool ChannelEndpoint::OnReadMessage( - const MessageInTransit::View& message_view, - embedder::ScopedPlatformHandleVectorPtr platform_handles) { - scoped_ptr<MessageInTransit> message(new MessageInTransit(message_view)); +void ChannelEndpoint::OnReadMessage(scoped_ptr<MessageInTransit> message) { scoped_refptr<ChannelEndpointClient> client; unsigned client_port; { @@ -97,15 +93,7 @@ bool ChannelEndpoint::OnReadMessage( if (!client_.get()) { // This isn't a failure per se. (It just means that, e.g., the other end // of the message point closed first.) - return true; - } - - if (message_view.transport_data_buffer_size() > 0) { - DCHECK(message_view.transport_data_buffer()); - message->SetDispatchers(TransportData::DeserializeDispatchers( - message_view.transport_data_buffer(), - message_view.transport_data_buffer_size(), platform_handles.Pass(), - channel_)); + return; } // Take a ref, and call |OnReadMessage()| outside the lock. @@ -113,7 +101,7 @@ bool ChannelEndpoint::OnReadMessage( client_port = client_port_; } - return client->OnReadMessage(client_port, message.Pass()); + client->OnReadMessage(client_port, message.Pass()); } void ChannelEndpoint::DetachFromChannel() { |