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

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

Issue 414393002: Convert verification of options structs to use the new user pointer handling (see r285350). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: temporarily disable part of OptionsValidationTest.InvalidDeath Created 6 years, 4 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/data_pipe_unittest.cc ('k') | mojo/system/dispatcher.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 #ifndef MOJO_SYSTEM_DISPATCHER_H_ 5 #ifndef MOJO_SYSTEM_DISPATCHER_H_
6 #define MOJO_SYSTEM_DISPATCHER_H_ 6 #define MOJO_SYSTEM_DISPATCHER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 UserPointer<uint32_t> num_bytes, 103 UserPointer<uint32_t> num_bytes,
104 MojoReadDataFlags flags); 104 MojoReadDataFlags flags);
105 MojoResult BeginReadData(UserPointer<const void*> buffer, 105 MojoResult BeginReadData(UserPointer<const void*> buffer,
106 UserPointer<uint32_t> buffer_num_bytes, 106 UserPointer<uint32_t> buffer_num_bytes,
107 MojoReadDataFlags flags); 107 MojoReadDataFlags flags);
108 MojoResult EndReadData(uint32_t num_bytes_read); 108 MojoResult EndReadData(uint32_t num_bytes_read);
109 // |options| may be null. |new_dispatcher| must not be null, but 109 // |options| may be null. |new_dispatcher| must not be null, but
110 // |*new_dispatcher| should be null (and will contain the dispatcher for the 110 // |*new_dispatcher| should be null (and will contain the dispatcher for the
111 // new handle on success). 111 // new handle on success).
112 MojoResult DuplicateBufferHandle( 112 MojoResult DuplicateBufferHandle(
113 const MojoDuplicateBufferHandleOptions* options, 113 UserPointer<const MojoDuplicateBufferHandleOptions> options,
114 scoped_refptr<Dispatcher>* new_dispatcher); 114 scoped_refptr<Dispatcher>* new_dispatcher);
115 MojoResult MapBuffer(uint64_t offset, 115 MojoResult MapBuffer(uint64_t offset,
116 uint64_t num_bytes, 116 uint64_t num_bytes,
117 MojoMapBufferFlags flags, 117 MojoMapBufferFlags flags,
118 scoped_ptr<RawSharedBufferMapping>* mapping); 118 scoped_ptr<RawSharedBufferMapping>* mapping);
119 119
120 // Adds a waiter to this dispatcher. The waiter will be woken up when this 120 // Adds a waiter to this dispatcher. The waiter will be woken up when this
121 // object changes state to satisfy |signals| with context |context|. It will 121 // object changes state to satisfy |signals| with context |context|. It will
122 // also be woken up when it becomes impossible for the object to ever satisfy 122 // also be woken up when it becomes impossible for the object to ever satisfy
123 // |signals| with a suitable error status. 123 // |signals| with a suitable error status.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 virtual MojoResult EndWriteDataImplNoLock(uint32_t num_bytes_written); 232 virtual MojoResult EndWriteDataImplNoLock(uint32_t num_bytes_written);
233 virtual MojoResult ReadDataImplNoLock(UserPointer<void> elements, 233 virtual MojoResult ReadDataImplNoLock(UserPointer<void> elements,
234 UserPointer<uint32_t> num_bytes, 234 UserPointer<uint32_t> num_bytes,
235 MojoReadDataFlags flags); 235 MojoReadDataFlags flags);
236 virtual MojoResult BeginReadDataImplNoLock( 236 virtual MojoResult BeginReadDataImplNoLock(
237 UserPointer<const void*> buffer, 237 UserPointer<const void*> buffer,
238 UserPointer<uint32_t> buffer_num_bytes, 238 UserPointer<uint32_t> buffer_num_bytes,
239 MojoReadDataFlags flags); 239 MojoReadDataFlags flags);
240 virtual MojoResult EndReadDataImplNoLock(uint32_t num_bytes_read); 240 virtual MojoResult EndReadDataImplNoLock(uint32_t num_bytes_read);
241 virtual MojoResult DuplicateBufferHandleImplNoLock( 241 virtual MojoResult DuplicateBufferHandleImplNoLock(
242 const MojoDuplicateBufferHandleOptions* options, 242 UserPointer<const MojoDuplicateBufferHandleOptions> options,
243 scoped_refptr<Dispatcher>* new_dispatcher); 243 scoped_refptr<Dispatcher>* new_dispatcher);
244 virtual MojoResult MapBufferImplNoLock( 244 virtual MojoResult MapBufferImplNoLock(
245 uint64_t offset, 245 uint64_t offset,
246 uint64_t num_bytes, 246 uint64_t num_bytes,
247 MojoMapBufferFlags flags, 247 MojoMapBufferFlags flags,
248 scoped_ptr<RawSharedBufferMapping>* mapping); 248 scoped_ptr<RawSharedBufferMapping>* mapping);
249 virtual MojoResult AddWaiterImplNoLock(Waiter* waiter, 249 virtual MojoResult AddWaiterImplNoLock(Waiter* waiter,
250 MojoHandleSignals signals, 250 MojoHandleSignals signals,
251 uint32_t context); 251 uint32_t context);
252 virtual void RemoveWaiterImplNoLock(Waiter* waiter); 252 virtual void RemoveWaiterImplNoLock(Waiter* waiter);
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 373
374 Dispatcher* dispatcher_; 374 Dispatcher* dispatcher_;
375 375
376 // Copy and assign allowed. 376 // Copy and assign allowed.
377 }; 377 };
378 378
379 } // namespace system 379 } // namespace system
380 } // namespace mojo 380 } // namespace mojo
381 381
382 #endif // MOJO_SYSTEM_DISPATCHER_H_ 382 #endif // MOJO_SYSTEM_DISPATCHER_H_
OLDNEW
« no previous file with comments | « mojo/system/data_pipe_unittest.cc ('k') | mojo/system/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698