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

Unified Diff: mojo/data_pipe_utils/data_pipe_utils.h

Issue 1303343007: Created a blocking copy to temporary file function. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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
Index: mojo/data_pipe_utils/data_pipe_utils.h
diff --git a/mojo/data_pipe_utils/data_pipe_utils.h b/mojo/data_pipe_utils/data_pipe_utils.h
index 289fe12a8eda1b566de9f3db2f1b887fb94d1b60..88965a344eb5b3a40f29c13cd24ac70ecd135c6d 100644
--- a/mojo/data_pipe_utils/data_pipe_utils.h
+++ b/mojo/data_pipe_utils/data_pipe_utils.h
@@ -48,6 +48,12 @@ bool BlockingCopyFromString(const std::string& source,
bool BlockingCopyToFile(ScopedDataPipeConsumerHandle source,
const base::FilePath& destination);
+// Similar to BlockingCopyToFile, but copies source data to a temporary
+// file which is unlinked immediately so that it is only accessible by
+// file descriptor (and removed once closed or the creating process dies).
+bool BlockingCopyToTempFile(ScopedDataPipeConsumerHandle source,
+ FILE** fpp);
+
} // namespace common
} // namespace mojo
« mojo/data_pipe_utils/data_pipe_file_utils.cc ('K') | « mojo/data_pipe_utils/data_pipe_file_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698