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

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

Issue 417113010: Convert ReadData...() to use the new user pointer handling (see r285350). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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_unittest.cc ('k') | mojo/system/local_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_LOCAL_DATA_PIPE_H_ 5 #ifndef MOJO_SYSTEM_LOCAL_DATA_PIPE_H_
6 #define MOJO_SYSTEM_LOCAL_DATA_PIPE_H_ 6 #define MOJO_SYSTEM_LOCAL_DATA_PIPE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/aligned_memory.h" 9 #include "base/memory/aligned_memory.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 25 matching lines...) Expand all
36 bool all_or_none) OVERRIDE; 36 bool all_or_none) OVERRIDE;
37 virtual MojoResult ProducerBeginWriteDataImplNoLock( 37 virtual MojoResult ProducerBeginWriteDataImplNoLock(
38 UserPointer<void*> buffer, 38 UserPointer<void*> buffer,
39 UserPointer<uint32_t> buffer_num_bytes, 39 UserPointer<uint32_t> buffer_num_bytes,
40 uint32_t min_num_bytes_to_write) OVERRIDE; 40 uint32_t min_num_bytes_to_write) OVERRIDE;
41 virtual MojoResult ProducerEndWriteDataImplNoLock( 41 virtual MojoResult ProducerEndWriteDataImplNoLock(
42 uint32_t num_bytes_written) OVERRIDE; 42 uint32_t num_bytes_written) OVERRIDE;
43 virtual HandleSignalsState 43 virtual HandleSignalsState
44 ProducerGetHandleSignalsStateNoLock() const OVERRIDE; 44 ProducerGetHandleSignalsStateNoLock() const OVERRIDE;
45 virtual void ConsumerCloseImplNoLock() OVERRIDE; 45 virtual void ConsumerCloseImplNoLock() OVERRIDE;
46 virtual MojoResult ConsumerReadDataImplNoLock(void* elements, 46 virtual MojoResult ConsumerReadDataImplNoLock(
47 uint32_t* num_bytes, 47 UserPointer<void> elements,
48 bool all_or_none) OVERRIDE; 48 UserPointer<uint32_t> num_bytes,
49 virtual MojoResult ConsumerDiscardDataImplNoLock(uint32_t* num_bytes, 49 uint32_t max_num_bytes_to_read,
50 bool all_or_none) OVERRIDE; 50 uint32_t min_num_bytes_to_read) OVERRIDE;
51 virtual MojoResult ConsumerQueryDataImplNoLock(uint32_t* num_bytes) OVERRIDE; 51 virtual MojoResult ConsumerDiscardDataImplNoLock(
52 UserPointer<uint32_t> num_bytes,
53 uint32_t max_num_bytes_to_discard,
54 uint32_t min_num_bytes_to_discard) OVERRIDE;
55 virtual MojoResult ConsumerQueryDataImplNoLock(
56 UserPointer<uint32_t> num_bytes) OVERRIDE;
52 virtual MojoResult ConsumerBeginReadDataImplNoLock( 57 virtual MojoResult ConsumerBeginReadDataImplNoLock(
53 UserPointer<const void*> buffer, 58 UserPointer<const void*> buffer,
54 UserPointer<uint32_t> buffer_num_bytes, 59 UserPointer<uint32_t> buffer_num_bytes,
55 uint32_t min_num_bytes_to_read) OVERRIDE; 60 uint32_t min_num_bytes_to_read) OVERRIDE;
56 virtual MojoResult ConsumerEndReadDataImplNoLock( 61 virtual MojoResult ConsumerEndReadDataImplNoLock(
57 uint32_t num_bytes_read) OVERRIDE; 62 uint32_t num_bytes_read) OVERRIDE;
58 virtual HandleSignalsState 63 virtual HandleSignalsState
59 ConsumerGetHandleSignalsStateNoLock() const OVERRIDE; 64 ConsumerGetHandleSignalsStateNoLock() const OVERRIDE;
60 65
61 void EnsureBufferNoLock(); 66 void EnsureBufferNoLock();
(...skipping 14 matching lines...) Expand all
76 size_t start_index_; 81 size_t start_index_;
77 size_t current_num_bytes_; 82 size_t current_num_bytes_;
78 83
79 DISALLOW_COPY_AND_ASSIGN(LocalDataPipe); 84 DISALLOW_COPY_AND_ASSIGN(LocalDataPipe);
80 }; 85 };
81 86
82 } // namespace system 87 } // namespace system
83 } // namespace mojo 88 } // namespace mojo
84 89
85 #endif // MOJO_SYSTEM_LOCAL_DATA_PIPE_H_ 90 #endif // MOJO_SYSTEM_LOCAL_DATA_PIPE_H_
OLDNEW
« no previous file with comments | « mojo/system/dispatcher_unittest.cc ('k') | mojo/system/local_data_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698