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

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

Issue 1947733002: EDK: Rename DispatcherTransport to HandleTransport. (Closed) Base URL: https://github.com/domokit/mojo.git@work790_edk_handle_11-x-work788_edk_handle_10
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/message_pipe_dispatcher.h" 5 #include "mojo/edk/system/message_pipe_dispatcher.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "mojo/edk/system/configuration.h" 10 #include "mojo/edk/system/configuration.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // too. 155 // too.
156 auto dispatcher = MessagePipeDispatcher::Create(kDefaultCreateOptions); 156 auto dispatcher = MessagePipeDispatcher::Create(kDefaultCreateOptions);
157 dispatcher->Init(std::move(message_pipe_), port_); 157 dispatcher->Init(std::move(message_pipe_), port_);
158 port_ = kInvalidPort; 158 port_ = kInvalidPort;
159 return dispatcher; 159 return dispatcher;
160 } 160 }
161 161
162 MojoResult MessagePipeDispatcher::WriteMessageImplNoLock( 162 MojoResult MessagePipeDispatcher::WriteMessageImplNoLock(
163 UserPointer<const void> bytes, 163 UserPointer<const void> bytes,
164 uint32_t num_bytes, 164 uint32_t num_bytes,
165 std::vector<DispatcherTransport>* transports, 165 std::vector<HandleTransport>* transports,
166 MojoWriteMessageFlags flags) { 166 MojoWriteMessageFlags flags) {
167 DCHECK(!transports || 167 DCHECK(!transports ||
168 (transports->size() > 0 && 168 (transports->size() > 0 &&
169 transports->size() <= GetConfiguration().max_message_num_handles)); 169 transports->size() <= GetConfiguration().max_message_num_handles));
170 170
171 mutex().AssertHeld(); 171 mutex().AssertHeld();
172 172
173 if (num_bytes > GetConfiguration().max_message_num_bytes) 173 if (num_bytes > GetConfiguration().max_message_num_bytes)
174 return MOJO_RESULT_RESOURCE_EXHAUSTED; 174 return MOJO_RESULT_RESOURCE_EXHAUSTED;
175 175
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 229
230 bool rv = message_pipe_->EndSerialize(port_, channel, destination, 230 bool rv = message_pipe_->EndSerialize(port_, channel, destination,
231 actual_size, platform_handles); 231 actual_size, platform_handles);
232 message_pipe_ = nullptr; 232 message_pipe_ = nullptr;
233 port_ = kInvalidPort; 233 port_ = kInvalidPort;
234 return rv; 234 return rv;
235 } 235 }
236 236
237 } // namespace system 237 } // namespace system
238 } // namespace mojo 238 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/message_pipe_dispatcher.h ('k') | mojo/edk/system/multiprocess_message_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698