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

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

Issue 1374463002: Remove support for "all or none" two-phase data pipe read/write. (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
Index: mojo/edk/system/data_pipe_consumer_dispatcher.cc
diff --git a/mojo/edk/system/data_pipe_consumer_dispatcher.cc b/mojo/edk/system/data_pipe_consumer_dispatcher.cc
index 5a1bafb450329c82b6245e0676aacd3c8933f20c..0821c64e87b49858b6df2101287beb17dad76cf4 100644
--- a/mojo/edk/system/data_pipe_consumer_dispatcher.cc
+++ b/mojo/edk/system/data_pipe_consumer_dispatcher.cc
@@ -107,12 +107,13 @@ MojoResult DataPipeConsumerDispatcher::BeginReadDataImplNoLock(
mutex().AssertHeld();
// These flags may not be used in two-phase mode.
- if ((flags & MOJO_READ_DATA_FLAG_DISCARD) ||
+ if ((flags & MOJO_READ_DATA_FLAG_ALL_OR_NONE) ||
+ (flags & MOJO_READ_DATA_FLAG_DISCARD) ||
(flags & MOJO_READ_DATA_FLAG_QUERY) || (flags & MOJO_READ_DATA_FLAG_PEEK))
return MOJO_RESULT_INVALID_ARGUMENT;
- return data_pipe_->ConsumerBeginReadData(
- buffer, buffer_num_bytes, (flags & MOJO_READ_DATA_FLAG_ALL_OR_NONE));
+ // TODO(vtl): Remove all-or-none support at lower levels.
+ return data_pipe_->ConsumerBeginReadData(buffer, buffer_num_bytes, false);
}
MojoResult DataPipeConsumerDispatcher::EndReadDataImplNoLock(

Powered by Google App Engine
This is Rietveld 408576698