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

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: Added new BlockingCopy function to SFI content handler Created 5 years, 3 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..989806b1afd7735690e8bbf2371c36abbf4dc2ed 100644
--- a/mojo/data_pipe_utils/data_pipe_utils.h
+++ b/mojo/data_pipe_utils/data_pipe_utils.h
@@ -42,11 +42,11 @@ bool BlockingCopyToString(ScopedDataPipeConsumerHandle source,
bool 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 BlockingCopyToFile(ScopedDataPipeConsumerHandle source,
- const base::FilePath& destination);
+// Synchronously copies source data to a temporary file, returning a file
+// pointer on success and NULL on error. The temporary file is unlinked
+// immediately so that it is only accessible by file pointer (and removed once
+// closed or the creating process dies).
+FILE* BlockingCopyToTempFile(ScopedDataPipeConsumerHandle source);
} // namespace common
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698