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

Unified Diff: mojo/edk/system/remote_producer_data_pipe_impl.cc

Issue 1365383004: Cleanup: Remove internal two-phase data pipe all-or-none support. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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/edk/system/remote_producer_data_pipe_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/remote_producer_data_pipe_impl.cc
diff --git a/mojo/edk/system/remote_producer_data_pipe_impl.cc b/mojo/edk/system/remote_producer_data_pipe_impl.cc
index 847949f386c0109ccf90048bf3dbb204cc278ee1..abf1e962c8af7fab4acf87b397fcf65578d9d5c9 100644
--- a/mojo/edk/system/remote_producer_data_pipe_impl.cc
+++ b/mojo/edk/system/remote_producer_data_pipe_impl.cc
@@ -133,8 +133,7 @@ MojoResult RemoteProducerDataPipeImpl::ProducerWriteData(
MojoResult RemoteProducerDataPipeImpl::ProducerBeginWriteData(
UserPointer<void*> /*buffer*/,
- UserPointer<uint32_t> /*buffer_num_bytes*/,
- uint32_t /*min_num_bytes_to_write*/) {
+ UserPointer<uint32_t> /*buffer_num_bytes*/) {
NOTREACHED();
return MOJO_RESULT_INTERNAL;
}
@@ -250,16 +249,8 @@ MojoResult RemoteProducerDataPipeImpl::ConsumerQueryData(
MojoResult RemoteProducerDataPipeImpl::ConsumerBeginReadData(
UserPointer<const void*> buffer,
- UserPointer<uint32_t> buffer_num_bytes,
- uint32_t min_num_bytes_to_read) {
+ UserPointer<uint32_t> buffer_num_bytes) {
size_t max_num_bytes_to_read = GetMaxNumBytesToRead();
- if (min_num_bytes_to_read > max_num_bytes_to_read) {
- // Don't return "should wait" since you can't wait for a specified amount of
- // data.
- return producer_open() ? MOJO_RESULT_OUT_OF_RANGE
- : MOJO_RESULT_FAILED_PRECONDITION;
- }
-
// Don't go into a two-phase read if there's no data.
if (max_num_bytes_to_read == 0) {
return producer_open() ? MOJO_RESULT_SHOULD_WAIT
« no previous file with comments | « mojo/edk/system/remote_producer_data_pipe_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698