| Index: mojo/data_pipe_utils/data_pipe_file_utils.cc
|
| diff --git a/mojo/data_pipe_utils/data_pipe_file_utils.cc b/mojo/data_pipe_utils/data_pipe_file_utils.cc
|
| index 08b24a3bf9b1ba9a241171eb4f8ca1019545b3d4..3a4170db4a3e2a8d0b252208cb139be84059ba41 100644
|
| --- a/mojo/data_pipe_utils/data_pipe_file_utils.cc
|
| +++ b/mojo/data_pipe_utils/data_pipe_file_utils.cc
|
| @@ -335,6 +335,22 @@ base::ScopedFILE BlockingCopyToTempFile(ScopedDataPipeConsumerHandle source) {
|
| return fp;
|
| }
|
|
|
| +base::FilePath BlockingCopyToNewTempFile(ScopedDataPipeConsumerHandle source) {
|
| + base::FilePath path;
|
| + base::ScopedFILE fp(CreateAndOpenTemporaryFile(&path));
|
| + if (!fp) {
|
| + LOG(ERROR) << "CreateAndOpenTemporaryFile failed in"
|
| + << "BlockingCopyToTempFile";
|
| + return base::FilePath("");
|
| + }
|
| + if (!BlockingCopyHelper(source.Pass(),
|
| + base::Bind(&CopyToFileHelper, fp.get()))) {
|
| + LOG(ERROR) << "Could not copy source to temporary file";
|
| + return base::FilePath("");
|
| + }
|
| + return path;
|
| +}
|
| +
|
| void CopyToFile(ScopedDataPipeConsumerHandle source,
|
| const base::FilePath& destination,
|
| base::TaskRunner* task_runner,
|
|
|