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

Side by Side Diff: mojo/system/dispatcher.cc

Issue 219023010: Mojo: RawSharedBuffer::Mapping -> RawSharedBufferMapping. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « mojo/system/dispatcher.h ('k') | mojo/system/dispatcher_unittest.cc » ('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 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/system/dispatcher.h" 5 #include "mojo/system/dispatcher.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "mojo/system/constants.h" 8 #include "mojo/system/constants.h"
9 #include "mojo/system/message_pipe_dispatcher.h" 9 #include "mojo/system/message_pipe_dispatcher.h"
10 10
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 if (is_closed_) 184 if (is_closed_)
185 return MOJO_RESULT_INVALID_ARGUMENT; 185 return MOJO_RESULT_INVALID_ARGUMENT;
186 186
187 return DuplicateBufferHandleImplNoLock(options, new_dispatcher); 187 return DuplicateBufferHandleImplNoLock(options, new_dispatcher);
188 } 188 }
189 189
190 MojoResult Dispatcher::MapBuffer( 190 MojoResult Dispatcher::MapBuffer(
191 uint64_t offset, 191 uint64_t offset,
192 uint64_t num_bytes, 192 uint64_t num_bytes,
193 MojoMapBufferFlags flags, 193 MojoMapBufferFlags flags,
194 scoped_ptr<RawSharedBuffer::Mapping>* mapping) { 194 scoped_ptr<RawSharedBufferMapping>* mapping) {
195 base::AutoLock locker(lock_); 195 base::AutoLock locker(lock_);
196 if (is_closed_) 196 if (is_closed_)
197 return MOJO_RESULT_INVALID_ARGUMENT; 197 return MOJO_RESULT_INVALID_ARGUMENT;
198 198
199 return MapBufferImplNoLock(offset, num_bytes, flags, mapping); 199 return MapBufferImplNoLock(offset, num_bytes, flags, mapping);
200 } 200 }
201 201
202 MojoResult Dispatcher::AddWaiter(Waiter* waiter, 202 MojoResult Dispatcher::AddWaiter(Waiter* waiter,
203 MojoWaitFlags flags, 203 MojoWaitFlags flags,
204 MojoResult wake_result) { 204 MojoResult wake_result) {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 lock_.AssertAcquired(); 320 lock_.AssertAcquired();
321 DCHECK(!is_closed_); 321 DCHECK(!is_closed_);
322 // By default, not supported. Only needed for buffer dispatchers. 322 // By default, not supported. Only needed for buffer dispatchers.
323 return MOJO_RESULT_INVALID_ARGUMENT; 323 return MOJO_RESULT_INVALID_ARGUMENT;
324 } 324 }
325 325
326 MojoResult Dispatcher::MapBufferImplNoLock( 326 MojoResult Dispatcher::MapBufferImplNoLock(
327 uint64_t /*offset*/, 327 uint64_t /*offset*/,
328 uint64_t /*num_bytes*/, 328 uint64_t /*num_bytes*/,
329 MojoMapBufferFlags /*flags*/, 329 MojoMapBufferFlags /*flags*/,
330 scoped_ptr<RawSharedBuffer::Mapping>* /*mapping*/) { 330 scoped_ptr<RawSharedBufferMapping>* /*mapping*/) {
331 lock_.AssertAcquired(); 331 lock_.AssertAcquired();
332 DCHECK(!is_closed_); 332 DCHECK(!is_closed_);
333 // By default, not supported. Only needed for buffer dispatchers. 333 // By default, not supported. Only needed for buffer dispatchers.
334 return MOJO_RESULT_INVALID_ARGUMENT; 334 return MOJO_RESULT_INVALID_ARGUMENT;
335 } 335 }
336 336
337 MojoResult Dispatcher::AddWaiterImplNoLock(Waiter* /*waiter*/, 337 MojoResult Dispatcher::AddWaiterImplNoLock(Waiter* /*waiter*/,
338 MojoWaitFlags /*flags*/, 338 MojoWaitFlags /*flags*/,
339 MojoResult /*wake_result*/) { 339 MojoResult /*wake_result*/) {
340 lock_.AssertAcquired(); 340 lock_.AssertAcquired();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 // DispatcherTransport --------------------------------------------------------- 440 // DispatcherTransport ---------------------------------------------------------
441 441
442 void DispatcherTransport::End() { 442 void DispatcherTransport::End() {
443 DCHECK(dispatcher_); 443 DCHECK(dispatcher_);
444 dispatcher_->lock_.Release(); 444 dispatcher_->lock_.Release();
445 dispatcher_ = NULL; 445 dispatcher_ = NULL;
446 } 446 }
447 447
448 } // namespace system 448 } // namespace system
449 } // namespace mojo 449 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/system/dispatcher.h ('k') | mojo/system/dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698