| Index: mojo/edk/system/data_pipe.cc
|
| diff --git a/mojo/edk/system/data_pipe.cc b/mojo/edk/system/data_pipe.cc
|
| index a18c72de7b6f2450e561afdcb0f4cb5753bee3c6..bc2daea91b2f88ae8eb95574e9be75703f9cc451 100644
|
| --- a/mojo/edk/system/data_pipe.cc
|
| +++ b/mojo/edk/system/data_pipe.cc
|
| @@ -309,8 +309,7 @@ MojoResult DataPipe::ProducerWriteData(UserPointer<const void> elements,
|
|
|
| MojoResult DataPipe::ProducerBeginWriteData(
|
| UserPointer<void*> buffer,
|
| - UserPointer<uint32_t> buffer_num_bytes,
|
| - bool all_or_none) {
|
| + UserPointer<uint32_t> buffer_num_bytes) {
|
| MutexLocker locker(&mutex_);
|
| DCHECK(has_local_producer_no_lock());
|
|
|
| @@ -319,15 +318,7 @@ MojoResult DataPipe::ProducerBeginWriteData(
|
| if (!consumer_open_no_lock())
|
| return MOJO_RESULT_FAILED_PRECONDITION;
|
|
|
| - uint32_t min_num_bytes_to_write = 0;
|
| - if (all_or_none) {
|
| - min_num_bytes_to_write = buffer_num_bytes.Get();
|
| - if (min_num_bytes_to_write % element_num_bytes() != 0)
|
| - return MOJO_RESULT_INVALID_ARGUMENT;
|
| - }
|
| -
|
| - MojoResult rv = impl_->ProducerBeginWriteData(buffer, buffer_num_bytes,
|
| - min_num_bytes_to_write);
|
| + MojoResult rv = impl_->ProducerBeginWriteData(buffer, buffer_num_bytes);
|
| if (rv != MOJO_RESULT_OK)
|
| return rv;
|
| // Note: No need to awake producer awakables, even though we're going from
|
| @@ -533,23 +524,14 @@ MojoResult DataPipe::ConsumerQueryData(UserPointer<uint32_t> num_bytes) {
|
|
|
| MojoResult DataPipe::ConsumerBeginReadData(
|
| UserPointer<const void*> buffer,
|
| - UserPointer<uint32_t> buffer_num_bytes,
|
| - bool all_or_none) {
|
| + UserPointer<uint32_t> buffer_num_bytes) {
|
| MutexLocker locker(&mutex_);
|
| DCHECK(has_local_consumer_no_lock());
|
|
|
| if (consumer_in_two_phase_read_no_lock())
|
| return MOJO_RESULT_BUSY;
|
|
|
| - uint32_t min_num_bytes_to_read = 0;
|
| - if (all_or_none) {
|
| - min_num_bytes_to_read = buffer_num_bytes.Get();
|
| - if (min_num_bytes_to_read % element_num_bytes() != 0)
|
| - return MOJO_RESULT_INVALID_ARGUMENT;
|
| - }
|
| -
|
| - MojoResult rv = impl_->ConsumerBeginReadData(buffer, buffer_num_bytes,
|
| - min_num_bytes_to_read);
|
| + MojoResult rv = impl_->ConsumerBeginReadData(buffer, buffer_num_bytes);
|
| if (rv != MOJO_RESULT_OK)
|
| return rv;
|
| DCHECK(consumer_in_two_phase_read_no_lock());
|
|
|