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

Unified Diff: mojo/system/data_pipe.h

Issue 423583002: Convert WriteData...() 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 d2bdf0d9cc391467b0ee9d262da70f9531d67ae6..0cdaad8dd131d21d25af900a499b61d048cefc28 100644
--- a/mojo/system/data_pipe.h
+++ b/mojo/system/data_pipe.h
@@ -50,10 +50,8 @@ class MOJO_SYSTEM_IMPL_EXPORT DataPipe :
// corresponding names.
void ProducerCancelAllWaiters();
void ProducerClose();
- // This does not validate its arguments, except to check that |*num_bytes| is
- // a multiple of |element_num_bytes_|.
- MojoResult ProducerWriteData(const void* elements,
- uint32_t* num_bytes,
+ MojoResult ProducerWriteData(UserPointer<const void> elements,
+ UserPointer<uint32_t> num_bytes,
bool all_or_none);
MojoResult ProducerBeginWriteData(UserPointer<void*> buffer,
UserPointer<uint32_t> buffer_num_bytes,
@@ -96,10 +94,12 @@ class MOJO_SYSTEM_IMPL_EXPORT DataPipe :
virtual ~DataPipe();
virtual void ProducerCloseImplNoLock() = 0;
- // |*num_bytes| will be a nonzero multiple of |element_num_bytes_|.
- virtual MojoResult ProducerWriteDataImplNoLock(const void* elements,
- uint32_t* num_bytes,
- bool all_or_none) = 0;
+ // |num_bytes.Get()| will be a nonzero multiple of |element_num_bytes_|.
+ virtual MojoResult ProducerWriteDataImplNoLock(
+ UserPointer<const void> elements,
+ UserPointer<uint32_t> num_bytes,
+ uint32_t max_num_bytes_to_write,
+ uint32_t min_num_bytes_to_write) = 0;
virtual MojoResult ProducerBeginWriteDataImplNoLock(
UserPointer<void*> buffer,
UserPointer<uint32_t> buffer_num_bytes,
« 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