Index: ipc/ipc_platform_file.h |
diff --git a/ipc/ipc_platform_file.h b/ipc/ipc_platform_file.h |
index 8fb1a39335c4aacf163d4820566e5708c8f917af..95b66b7a18d35747db68b44fcbfffc752fd5bfac 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, |