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

Side by Side Diff: mojo/system/data_pipe.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/core.cc ('k') | mojo/system/data_pipe.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_DATA_PIPE_H_ 5 #ifndef MOJO_SYSTEM_DATA_PIPE_H_
6 #define MOJO_SYSTEM_DATA_PIPE_H_ 6 #define MOJO_SYSTEM_DATA_PIPE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 25 matching lines...) Expand all
36 // this via |ValidateCreateOptions()| with a null |in_options|; this is 36 // this via |ValidateCreateOptions()| with a null |in_options|; this is
37 // exposed directly for testing convenience.) 37 // exposed directly for testing convenience.)
38 static const MojoCreateDataPipeOptions kDefaultCreateOptions; 38 static const MojoCreateDataPipeOptions kDefaultCreateOptions;
39 39
40 // Validates and/or sets default options for |MojoCreateDataPipeOptions|. If 40 // Validates and/or sets default options for |MojoCreateDataPipeOptions|. If
41 // non-null, |in_options| must point to a struct of at least 41 // non-null, |in_options| must point to a struct of at least
42 // |in_options->struct_size| bytes. |out_options| must point to a (current) 42 // |in_options->struct_size| bytes. |out_options| must point to a (current)
43 // |MojoCreateDataPipeOptions| and will be entirely overwritten on success (it 43 // |MojoCreateDataPipeOptions| and will be entirely overwritten on success (it
44 // may be partly overwritten on failure). 44 // may be partly overwritten on failure).
45 static MojoResult ValidateCreateOptions( 45 static MojoResult ValidateCreateOptions(
46 const MojoCreateDataPipeOptions* in_options, 46 UserPointer<const MojoCreateDataPipeOptions> in_options,
47 MojoCreateDataPipeOptions* out_options); 47 MojoCreateDataPipeOptions* out_options);
48 48
49 // These are called by the producer dispatcher to implement its methods of 49 // These are called by the producer dispatcher to implement its methods of
50 // corresponding names. 50 // corresponding names.
51 void ProducerCancelAllWaiters(); 51 void ProducerCancelAllWaiters();
52 void ProducerClose(); 52 void ProducerClose();
53 MojoResult ProducerWriteData(UserPointer<const void> elements, 53 MojoResult ProducerWriteData(UserPointer<const void> elements,
54 UserPointer<uint32_t> num_bytes, 54 UserPointer<uint32_t> num_bytes,
55 bool all_or_none); 55 bool all_or_none);
56 MojoResult ProducerBeginWriteData(UserPointer<void*> buffer, 56 MojoResult ProducerBeginWriteData(UserPointer<void*> buffer,
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 uint32_t producer_two_phase_max_num_bytes_written_; 201 uint32_t producer_two_phase_max_num_bytes_written_;
202 uint32_t consumer_two_phase_max_num_bytes_read_; 202 uint32_t consumer_two_phase_max_num_bytes_read_;
203 203
204 DISALLOW_COPY_AND_ASSIGN(DataPipe); 204 DISALLOW_COPY_AND_ASSIGN(DataPipe);
205 }; 205 };
206 206
207 } // namespace system 207 } // namespace system
208 } // namespace mojo 208 } // namespace mojo
209 209
210 #endif // MOJO_SYSTEM_DATA_PIPE_H_ 210 #endif // MOJO_SYSTEM_DATA_PIPE_H_
OLDNEW
« no previous file with comments | « mojo/system/core.cc ('k') | mojo/system/data_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698