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

Unified Diff: mojo/common/data_pipe_utils.h

Issue 467263006: JavaScript Content Handler Version 0.0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes per review feedback Created 6 years, 4 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/apps/js/main.cc ('k') | mojo/common/data_pipe_utils.cc » ('j') | no next file with comments »
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 dc2f66a005955cf8f1a0c58d6b4352004dc93193..2917225ada47e02fb09f7aeed9393cb49c5dae2e 100644
--- a/mojo/common/data_pipe_utils.h
+++ b/mojo/common/data_pipe_utils.h
@@ -5,6 +5,8 @@
#ifndef MOJO_SHELL_DATA_PIPE_UTILS_H_
#define MOJO_SHELL_DATA_PIPE_UTILS_H_
+#include <string>
+
#include "base/callback_forward.h"
#include "mojo/common/mojo_common_export.h"
#include "mojo/public/cpp/system/core.h"
@@ -26,6 +28,14 @@ void MOJO_COMMON_EXPORT CopyToFile(
base::TaskRunner* task_runner,
const base::Callback<void(bool /*success*/)>& callback);
+// Copies the data from |source| into |contents| and returns true on success and
+// false on error. In case of I/O error, |contents| holds the data that could
+// be read from source before the error occurred.
+// If |contents| is NULL, the data is read and discarded.
darin (slow to review) 2014/08/27 21:30:10 You should document the return value.
darin (slow to review) 2014/08/27 21:51:04 Sorry, my eyes were failing me... what confused me
+bool MOJO_COMMON_EXPORT BlockingCopyToString(
+ ScopedDataPipeConsumerHandle source,
+ std::string* contents);
+
} // namespace common
} // namespace mojo
« no previous file with comments | « mojo/apps/js/main.cc ('k') | mojo/common/data_pipe_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698