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

Unified Diff: mojo/common/data_pipe_utils.h

Issue 696543003: Mojo content handler shebang support (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | mojo/common/data_pipe_utils.cc » ('j') | mojo/common/data_pipe_utils.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/common/data_pipe_utils.h
diff --git a/mojo/common/data_pipe_utils.h b/mojo/common/data_pipe_utils.h
index dc2197b6e07fd14a7d1f08ec4da610e852367a5c..5952d9a03ba510dbf84a4f45c0f46c5c8e50d6d6 100644
--- a/mojo/common/data_pipe_utils.h
+++ b/mojo/common/data_pipe_utils.h
@@ -35,6 +35,23 @@ bool MOJO_COMMON_EXPORT BlockingCopyToString(
ScopedDataPipeConsumerHandle source,
std::string* contents);
+// Return true and the first newline terminated line from source. Return false
viettrungluu 2014/10/31 23:30:23 nit: s/Return/Returns/g
+// if more than max_line_length bytes are scanned without seeing a newline, or
+// if the timeout is exceeded.
+bool MOJO_COMMON_EXPORT BlockingPeekLine(
+ DataPipeConsumerHandle source,
+ std::string* line,
+ size_t max_line_length,
+ MojoDeadline timeout);
+
+// Return true and the first bytes_length bytes from source. Return false
viettrungluu 2014/10/31 23:30:23 ...
+// if the timeout is exceeded.
+bool MOJO_COMMON_EXPORT BlockingPeekNBytes(
+ DataPipeConsumerHandle source,
+ std::string* bytes,
+ size_t bytes_length,
+ MojoDeadline timeout);
+
} // namespace common
} // namespace mojo
« no previous file with comments | « no previous file | mojo/common/data_pipe_utils.cc » ('j') | mojo/common/data_pipe_utils.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698