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

Unified Diff: mojo/common/data_pipe_utils.h

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 years, 9 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/common/data_pipe_file_utils.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 65a0b8b557cd137556c78ac9b355f25319b8e9f2..5b32cfd8b92f6bca13c652d2498ba6e7cd178a7c 100644
--- a/mojo/common/data_pipe_utils.h
+++ b/mojo/common/data_pipe_utils.h
@@ -28,6 +28,13 @@ void MOJO_COMMON_EXPORT CopyToFile(
base::TaskRunner* task_runner,
const base::Callback<void(bool /*success*/)>& callback);
+void MOJO_COMMON_EXPORT
+CopyFromFile(const base::FilePath& source,
+ ScopedDataPipeProducerHandle destination,
+ uint32_t skip,
+ 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.
@@ -35,6 +42,16 @@ bool MOJO_COMMON_EXPORT BlockingCopyToString(
ScopedDataPipeConsumerHandle source,
std::string* contents);
+bool MOJO_COMMON_EXPORT BlockingCopyFromString(
+ const std::string& source,
+ const ScopedDataPipeProducerHandle& destination);
+
+// Synchronously copies data from source to the destination file returning true
+// on success and false on error. In case of an error, |destination| holds the
+// data that could be read from the source before the error occured.
+bool MOJO_COMMON_EXPORT BlockingCopyToFile(ScopedDataPipeConsumerHandle source,
+ const base::FilePath& destination);
+
} // namespace common
} // namespace mojo
« no previous file with comments | « mojo/common/data_pipe_file_utils.cc ('k') | mojo/common/data_pipe_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698