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

Unified Diff: mojo/edk/system/remote_consumer_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_consumer_data_pipe_impl.h ('k') | mojo/edk/system/remote_data_pipe_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/remote_consumer_data_pipe_impl.cc
diff --git a/mojo/edk/system/remote_consumer_data_pipe_impl.cc b/mojo/edk/system/remote_consumer_data_pipe_impl.cc
index ce0c24033df44357eaa337cc740b480bfabcd66d..7bbafb3c76d422bf26c6c0e5285bb9a83e5e95f0 100644
--- a/mojo/edk/system/remote_consumer_data_pipe_impl.cc
+++ b/mojo/edk/system/remote_consumer_data_pipe_impl.cc
@@ -177,8 +177,7 @@ MojoResult RemoteConsumerDataPipeImpl::ProducerWriteData(
MojoResult RemoteConsumerDataPipeImpl::ProducerBeginWriteData(
UserPointer<void*> buffer,
- UserPointer<uint32_t> buffer_num_bytes,
- uint32_t min_num_bytes_to_write) {
+ UserPointer<uint32_t> buffer_num_bytes) {
DCHECK(consumer_open());
DCHECK(channel_endpoint_);
@@ -186,12 +185,6 @@ MojoResult RemoteConsumerDataPipeImpl::ProducerBeginWriteData(
DCHECK_EQ(consumer_num_bytes_ % element_num_bytes(), 0u);
size_t max_num_bytes_to_write = capacity_num_bytes() - consumer_num_bytes_;
- if (min_num_bytes_to_write > max_num_bytes_to_write) {
- // Don't return "should wait" since you can't wait for a specified amount
- // of data.
- return MOJO_RESULT_OUT_OF_RANGE;
- }
-
// Don't go into a two-phase write if there's no room.
if (max_num_bytes_to_write == 0)
return MOJO_RESULT_SHOULD_WAIT;
@@ -343,8 +336,7 @@ MojoResult RemoteConsumerDataPipeImpl::ConsumerQueryData(
MojoResult RemoteConsumerDataPipeImpl::ConsumerBeginReadData(
UserPointer<const void*> /*buffer*/,
- UserPointer<uint32_t> /*buffer_num_bytes*/,
- uint32_t /*min_num_bytes_to_read*/) {
+ UserPointer<uint32_t> /*buffer_num_bytes*/) {
NOTREACHED();
return MOJO_RESULT_INTERNAL;
}
« no previous file with comments | « mojo/edk/system/remote_consumer_data_pipe_impl.h ('k') | mojo/edk/system/remote_data_pipe_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698