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

Unified Diff: mojo/system/data_pipe.h

Issue 411253011: Convert BeginWriteData...() 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 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 2cab507e4625906e6d6de785a8ae9d10eecb27aa..cd7c96d8ed64fe339bdc5b120b146647a3b18109 100644
--- a/mojo/system/data_pipe.h
+++ b/mojo/system/data_pipe.h
@@ -14,6 +14,7 @@
#include "mojo/public/c/system/data_pipe.h"
#include "mojo/public/c/system/types.h"
#include "mojo/system/handle_signals_state.h"
+#include "mojo/system/memory.h"
#include "mojo/system/system_impl_export.h"
namespace mojo {
@@ -54,9 +55,8 @@ class MOJO_SYSTEM_IMPL_EXPORT DataPipe :
MojoResult ProducerWriteData(const void* elements,
uint32_t* num_bytes,
bool all_or_none);
- // This does not validate its arguments.
- MojoResult ProducerBeginWriteData(void** buffer,
- uint32_t* buffer_num_bytes,
+ MojoResult ProducerBeginWriteData(UserPointer<void*> buffer,
+ UserPointer<uint32_t> buffer_num_bytes,
bool all_or_none);
MojoResult ProducerEndWriteData(uint32_t num_bytes_written);
MojoResult ProducerAddWaiter(Waiter* waiter,
@@ -102,9 +102,9 @@ class MOJO_SYSTEM_IMPL_EXPORT DataPipe :
uint32_t* num_bytes,
bool all_or_none) = 0;
virtual MojoResult ProducerBeginWriteDataImplNoLock(
- void** buffer,
- uint32_t* buffer_num_bytes,
- bool all_or_none) = 0;
+ UserPointer<void*> buffer,
+ UserPointer<uint32_t> buffer_num_bytes,
+ uint32_t min_num_bytes_to_write) = 0;
virtual MojoResult ProducerEndWriteDataImplNoLock(
uint32_t num_bytes_written) = 0;
// Note: A producer should not be writable during a two-phase write.
« 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