diff options
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc_platform_file.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ipc/ipc_platform_file.h b/ipc/ipc_platform_file.h index 8fb1a39..95b66b7 100644 --- a/ipc/ipc_platform_file.h +++ b/ipc/ipc_platform_file.h @@ -40,6 +40,15 @@ inline base::PlatformFile PlatformFileForTransitToPlatformFile( #endif } +inline base::File PlatformFileForTransitToFile( + const PlatformFileForTransit& transit) { +#if defined(OS_WIN) + return base::File(transit); +#elif defined(OS_POSIX) + return base::File(transit.fd); +#endif +} + // Returns a file handle equivalent to |file| that can be used in |process|. IPC_EXPORT PlatformFileForTransit GetFileHandleForProcess( base::PlatformFile file, |