| 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_DATA_PIPE_UTILS_DATA_PIPE_UTILS_H_ | 5 #ifndef MOJO_DATA_PIPE_UTILS_DATA_PIPE_UTILS_H_ |
| 6 #define MOJO_DATA_PIPE_UTILS_DATA_PIPE_UTILS_H_ | 6 #define MOJO_DATA_PIPE_UTILS_DATA_PIPE_UTILS_H_ |
| 7 | 7 |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // pointer on success and NULL on error. The temporary file is unlinked | 48 // pointer on success and NULL on error. The temporary file is unlinked |
| 49 // immediately so that it is only accessible by file pointer (and removed once | 49 // immediately so that it is only accessible by file pointer (and removed once |
| 50 // closed or the creating process dies). | 50 // closed or the creating process dies). |
| 51 base::ScopedFILE BlockingCopyToTempFile(ScopedDataPipeConsumerHandle source); | 51 base::ScopedFILE BlockingCopyToTempFile(ScopedDataPipeConsumerHandle source); |
| 52 | 52 |
| 53 // Similar to BlockingCopyToTempFile, but use a pre-defined file pointer | 53 // Similar to BlockingCopyToTempFile, but use a pre-defined file pointer |
| 54 // (rather than a newly created temp file) and do not unlink the file. | 54 // (rather than a newly created temp file) and do not unlink the file. |
| 55 // Returns true on success, false on failure. | 55 // Returns true on success, false on failure. |
| 56 bool BlockingCopyToFile(ScopedDataPipeConsumerHandle source, FILE* fp); | 56 bool BlockingCopyToFile(ScopedDataPipeConsumerHandle source, FILE* fp); |
| 57 | 57 |
| 58 mojo::ScopedDataPipeConsumerHandle WriteStringToConsumerHandle( |
| 59 const std::string& source); |
| 60 |
| 58 } // namespace common | 61 } // namespace common |
| 59 } // namespace mojo | 62 } // namespace mojo |
| 60 | 63 |
| 61 #endif // MOJO_DATA_PIPE_UTILS_DATA_PIPE_UTILS_H_ | 64 #endif // MOJO_DATA_PIPE_UTILS_DATA_PIPE_UTILS_H_ |
| OLD | NEW |