| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 IPC_IPC_PLATFORM_FILE_H_ | 5 #ifndef IPC_IPC_PLATFORM_FILE_H_ |
| 6 #define IPC_IPC_PLATFORM_FILE_H_ | 6 #define IPC_IPC_PLATFORM_FILE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
| 10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 return transit.fd; | 39 return transit.fd; |
| 40 #endif | 40 #endif |
| 41 } | 41 } |
| 42 | 42 |
| 43 // Returns a file handle equivalent to |file| that can be used in |process|. | 43 // Returns a file handle equivalent to |file| that can be used in |process|. |
| 44 IPC_EXPORT PlatformFileForTransit GetFileHandleForProcess( | 44 IPC_EXPORT PlatformFileForTransit GetFileHandleForProcess( |
| 45 base::PlatformFile file, | 45 base::PlatformFile file, |
| 46 base::ProcessHandle process, | 46 base::ProcessHandle process, |
| 47 bool close_source_handle); | 47 bool close_source_handle); |
| 48 | 48 |
| 49 // Returns a file handle equivalent to |file| that can be used in |process|. |
| 50 // Note that this function takes ownership of |file|. |
| 51 IPC_EXPORT PlatformFileForTransit TakeFileHandleForProcess( |
| 52 base::File file, |
| 53 base::ProcessHandle process); |
| 54 |
| 49 } // namespace IPC | 55 } // namespace IPC |
| 50 | 56 |
| 51 #endif // IPC_IPC_PLATFORM_FILE_H_ | 57 #endif // IPC_IPC_PLATFORM_FILE_H_ |
| OLD | NEW |