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

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

Issue 728133002: Update mojo sdk to rev e01f9a49449381a5eb430c1fd88bf2cae73ec35a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android + ios gyp fixes 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_endpoint.h ('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(), 112 message_view.transport_data_buffer_size(), platform_handles.Pass(),
113 platform_handles.Pass(),
114 channel_)); 113 channel_));
115 } 114 }
116 115
117 // Take a ref, and call |EnqueueMessage()| outside the lock. 116 // Take a ref, and call |EnqueueMessage()| outside the lock.
118 message_pipe = message_pipe_; 117 message_pipe = message_pipe_;
119 port = port_; 118 port = port_;
120 } 119 }
121 120
122 MojoResult result = message_pipe->EnqueueMessage( 121 MojoResult result = message_pipe->EnqueueMessage(
123 MessagePipe::GetPeerPort(port), message.Pass()); 122 MessagePipe::GetPeerPort(port), message.Pass());
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 DCHECK(remote_id_.is_valid()); 171 DCHECK(remote_id_.is_valid());
173 172
174 message->SerializeAndCloseDispatchers(channel_); 173 message->SerializeAndCloseDispatchers(channel_);
175 message->set_source_id(local_id_); 174 message->set_source_id(local_id_);
176 message->set_destination_id(remote_id_); 175 message->set_destination_id(remote_id_);
177 return channel_->WriteMessage(message.Pass()); 176 return channel_->WriteMessage(message.Pass());
178 } 177 }
179 178
180 } // namespace system 179 } // namespace system
181 } // namespace mojo 180 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/channel_endpoint.h ('k') | mojo/edk/system/channel_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698