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

Side by Side Diff: mojo/edk/system/channel_endpoint.cc

Issue 728043002: Revert of Update mojo sdk to rev afb4440fd5a10cba980878c326180b7ad7960480 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « mojo/edk/system/channel.cc ('k') | mojo/edk/system/channel_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/edk/system/channel_endpoint.h" 5 #include "mojo/edk/system/channel_endpoint.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "mojo/edk/system/channel.h" 8 #include "mojo/edk/system/channel.h"
9 #include "mojo/edk/system/message_pipe.h" 9 #include "mojo/edk/system/message_pipe.h"
10 #include "mojo/edk/system/transport_data.h" 10 #include "mojo/edk/system/transport_data.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 if (!message_pipe_.get()) { 102 if (!message_pipe_.get()) {
103 // This isn't a failure per se. (It just means that, e.g., the other end 103 // This isn't a failure per se. (It just means that, e.g., the other end
104 // of the message point closed first.) 104 // of the message point closed first.)
105 return true; 105 return true;
106 } 106 }
107 107
108 if (message_view.transport_data_buffer_size() > 0) { 108 if (message_view.transport_data_buffer_size() > 0) {
109 DCHECK(message_view.transport_data_buffer()); 109 DCHECK(message_view.transport_data_buffer());
110 message->SetDispatchers(TransportData::DeserializeDispatchers( 110 message->SetDispatchers(TransportData::DeserializeDispatchers(
111 message_view.transport_data_buffer(), 111 message_view.transport_data_buffer(),
112 message_view.transport_data_buffer_size(), platform_handles.Pass(), 112 message_view.transport_data_buffer_size(),
113 platform_handles.Pass(),
113 channel_)); 114 channel_));
114 } 115 }
115 116
116 // Take a ref, and call |EnqueueMessage()| outside the lock. 117 // Take a ref, and call |EnqueueMessage()| outside the lock.
117 message_pipe = message_pipe_; 118 message_pipe = message_pipe_;
118 port = port_; 119 port = port_;
119 } 120 }
120 121
121 MojoResult result = message_pipe->EnqueueMessage( 122 MojoResult result = message_pipe->EnqueueMessage(
122 MessagePipe::GetPeerPort(port), message.Pass()); 123 MessagePipe::GetPeerPort(port), message.Pass());
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 DCHECK(remote_id_.is_valid()); 172 DCHECK(remote_id_.is_valid());
172 173
173 message->SerializeAndCloseDispatchers(channel_); 174 message->SerializeAndCloseDispatchers(channel_);
174 message->set_source_id(local_id_); 175 message->set_source_id(local_id_);
175 message->set_destination_id(remote_id_); 176 message->set_destination_id(remote_id_);
176 return channel_->WriteMessage(message.Pass()); 177 return channel_->WriteMessage(message.Pass());
177 } 178 }
178 179
179 } // namespace system 180 } // namespace system
180 } // namespace mojo 181 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/channel.cc ('k') | mojo/edk/system/channel_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698