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

Unified Diff: mojo/edk/system/data_pipe.h

Issue 703573002: Implement a MOJO_READ_DATA_FLAG_PEEK flag for data pipes. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Test peek in 2-phase mode. Created 6 years, 1 month 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/core_unittest.cc ('k') | mojo/edk/system/data_pipe.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/data_pipe.h
diff --git a/mojo/edk/system/data_pipe.h b/mojo/edk/system/data_pipe.h
index 64b18e20a911d9377f20736ffbd5d182904c20a9..d4afddad2bbfd1477c3e4bc41fdfc8b9ecf1cc0d 100644
--- a/mojo/edk/system/data_pipe.h
+++ b/mojo/edk/system/data_pipe.h
@@ -73,7 +73,8 @@ class MOJO_SYSTEM_IMPL_EXPORT DataPipe
// a multiple of |element_num_bytes_|.
MojoResult ConsumerReadData(UserPointer<void> elements,
UserPointer<uint32_t> num_bytes,
- bool all_or_none);
+ bool all_or_none,
+ bool peek);
MojoResult ConsumerDiscardData(UserPointer<uint32_t> num_bytes,
bool all_or_none);
MojoResult ConsumerQueryData(UserPointer<uint32_t> num_bytes);
@@ -120,7 +121,8 @@ class MOJO_SYSTEM_IMPL_EXPORT DataPipe
UserPointer<void> elements,
UserPointer<uint32_t> num_bytes,
uint32_t max_num_bytes_to_read,
- uint32_t min_num_bytes_to_read) = 0;
+ uint32_t min_num_bytes_to_read,
+ bool peek) = 0;
virtual MojoResult ConsumerDiscardDataImplNoLock(
UserPointer<uint32_t> num_bytes,
uint32_t max_num_bytes_to_discard,
« no previous file with comments | « mojo/edk/system/core_unittest.cc ('k') | mojo/edk/system/data_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698