| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MOJO_SHELL_DATA_PIPE_UTILS_H_ | 5 #ifndef MOJO_SHELL_DATA_PIPE_UTILS_H_ |
| 6 #define MOJO_SHELL_DATA_PIPE_UTILS_H_ | 6 #define MOJO_SHELL_DATA_PIPE_UTILS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 11 #include "mojo/common/mojo_common_export.h" | 11 #include "mojo/common/mojo_common_export.h" |
| 12 #include "third_party/mojo/src/mojo/public/cpp/system/core.h" | 12 #include "mojo/public/cpp/system/core.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class FilePath; | 15 class FilePath; |
| 16 class TaskRunner; | 16 class TaskRunner; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace mojo { | 19 namespace mojo { |
| 20 namespace common { | 20 namespace common { |
| 21 | 21 |
| 22 // Asynchronously copies data from source to the destination file. The given | 22 // Asynchronously copies data from source to the destination file. The given |
| (...skipping 26 matching lines...) Expand all Loading... |
| 49 // Synchronously copies data from source to the destination file returning true | 49 // Synchronously copies data from source to the destination file returning true |
| 50 // on success and false on error. In case of an error, |destination| holds the | 50 // on success and false on error. In case of an error, |destination| holds the |
| 51 // data that could be read from the source before the error occured. | 51 // data that could be read from the source before the error occured. |
| 52 bool MOJO_COMMON_EXPORT BlockingCopyToFile(ScopedDataPipeConsumerHandle source, | 52 bool MOJO_COMMON_EXPORT BlockingCopyToFile(ScopedDataPipeConsumerHandle source, |
| 53 const base::FilePath& destination); | 53 const base::FilePath& destination); |
| 54 | 54 |
| 55 } // namespace common | 55 } // namespace common |
| 56 } // namespace mojo | 56 } // namespace mojo |
| 57 | 57 |
| 58 #endif // MOJO_SHELL_DATA_PIPE_UTILS_H_ | 58 #endif // MOJO_SHELL_DATA_PIPE_UTILS_H_ |
| OLD | NEW |