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

Unified Diff: mojo/system/data_pipe.h

Issue 416203002: Convert BeginReadData...() to use the new user pointer handling (see r285350). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/system/core_test_base.cc ('k') | mojo/system/data_pipe.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/data_pipe.h
diff --git a/mojo/system/data_pipe.h b/mojo/system/data_pipe.h
index cd7c96d8ed64fe339bdc5b120b146647a3b18109..60f77bcd27146337a216334e810fc3bfeaee4cef 100644
--- a/mojo/system/data_pipe.h
+++ b/mojo/system/data_pipe.h
@@ -77,9 +77,8 @@ class MOJO_SYSTEM_IMPL_EXPORT DataPipe :
MojoResult ConsumerDiscardData(uint32_t* num_bytes,
bool all_or_none);
MojoResult ConsumerQueryData(uint32_t* num_bytes);
- // This does not validate its arguments.
- MojoResult ConsumerBeginReadData(const void** buffer,
- uint32_t* buffer_num_bytes,
+ MojoResult ConsumerBeginReadData(UserPointer<const void*> buffer,
+ UserPointer<uint32_t> buffer_num_bytes,
bool all_or_none);
MojoResult ConsumerEndReadData(uint32_t num_bytes_read);
MojoResult ConsumerAddWaiter(Waiter* waiter,
@@ -119,9 +118,10 @@ class MOJO_SYSTEM_IMPL_EXPORT DataPipe :
bool all_or_none) = 0;
// |*num_bytes| will be a nonzero multiple of |element_num_bytes_|.
virtual MojoResult ConsumerQueryDataImplNoLock(uint32_t* num_bytes) = 0;
- virtual MojoResult ConsumerBeginReadDataImplNoLock(const void** buffer,
- uint32_t* buffer_num_bytes,
- bool all_or_none) = 0;
+ virtual MojoResult ConsumerBeginReadDataImplNoLock(
+ UserPointer<const void*> buffer,
+ UserPointer<uint32_t> buffer_num_bytes,
+ uint32_t min_num_bytes_to_read) = 0;
virtual MojoResult ConsumerEndReadDataImplNoLock(uint32_t num_bytes_read) = 0;
// Note: A consumer should not be writable during a two-phase read.
virtual HandleSignalsState ConsumerGetHandleSignalsStateNoLock() const = 0;
« no previous file with comments | « mojo/system/core_test_base.cc ('k') | mojo/system/data_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698