Chromium Code Reviews

Unified Diff: mojo/system/data_pipe_producer_dispatcher.cc

Issue 117763003: Mojo: Beginnings of (local) data pipe tests + more refactoring. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another small fix + more tests Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « mojo/system/data_pipe_consumer_dispatcher.cc ('k') | mojo/system/local_data_pipe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/data_pipe_producer_dispatcher.cc
diff --git a/mojo/system/data_pipe_producer_dispatcher.cc b/mojo/system/data_pipe_producer_dispatcher.cc
index fce93aa4985cc5072a85db2c70d31c1ec4b6fa72..52ffd8e136e054658ce0d76641c29e289fadbdff 100644
--- a/mojo/system/data_pipe_producer_dispatcher.cc
+++ b/mojo/system/data_pipe_producer_dispatcher.cc
@@ -47,7 +47,8 @@ MojoResult DataPipeProducerDispatcher::WriteDataImplNoLock(
if (!VerifyUserPointer<void>(elements, *num_bytes))
return MOJO_RESULT_INVALID_ARGUMENT;
- return data_pipe_->ProducerWriteData(elements, num_bytes, flags);
+ return data_pipe_->ProducerWriteData(
+ elements, num_bytes, (flags & MOJO_WRITE_DATA_FLAG_ALL_OR_NONE));
}
MojoResult DataPipeProducerDispatcher::BeginWriteDataImplNoLock(
@@ -61,7 +62,8 @@ MojoResult DataPipeProducerDispatcher::BeginWriteDataImplNoLock(
if (!VerifyUserPointer<uint32_t>(buffer_num_bytes, 1))
return MOJO_RESULT_INVALID_ARGUMENT;
- return data_pipe_->ProducerBeginWriteData(buffer, buffer_num_bytes, flags);
+ return data_pipe_->ProducerBeginWriteData(
+ buffer, buffer_num_bytes, (flags & MOJO_WRITE_DATA_FLAG_ALL_OR_NONE));
}
MojoResult DataPipeProducerDispatcher::EndWriteDataImplNoLock(
« no previous file with comments | « mojo/system/data_pipe_consumer_dispatcher.cc ('k') | mojo/system/local_data_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine