Index: content/browser/mojo/mojo_application_host.cc |
diff --git a/content/browser/mojo/mojo_application_host.cc b/content/browser/mojo/mojo_application_host.cc |
index b7529731ed4be3a531e128f87798472dab3c234d..bd6b9ab36019fe5ad5f74b004644c917dbc7d228 100644 |
--- a/content/browser/mojo/mojo_application_host.cc |
+++ b/content/browser/mojo/mojo_application_host.cc |
@@ -10,18 +10,6 @@ |
#include "mojo/embedder/platform_channel_pair.h" |
namespace content { |
-namespace { |
- |
-base::PlatformFile PlatformFileFromScopedPlatformHandle( |
- mojo::embedder::ScopedPlatformHandle handle) { |
-#if defined(OS_POSIX) |
- return handle.release().fd; |
-#elif defined(OS_WIN) |
- return handle.release().handle; |
-#endif |
-} |
- |
-} // namespace |
MojoApplicationHost::MojoApplicationHost() : did_activate_(false) { |
} |
@@ -35,7 +23,7 @@ bool MojoApplicationHost::Init() { |
mojo::embedder::PlatformChannelPair channel_pair; |
mojo::ScopedMessagePipeHandle message_pipe = channel_init_.Init( |
- PlatformFileFromScopedPlatformHandle(channel_pair.PassServerHandle()), |
+ channel_pair.PassServerHandle().release().ToPlaformFile(), |
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
if (!message_pipe.is_valid()) |
return false; |
@@ -53,7 +41,7 @@ void MojoApplicationHost::Activate(IPC::Sender* sender, |
DCHECK(client_handle_.is_valid()); |
base::PlatformFile client_file = |
- PlatformFileFromScopedPlatformHandle(client_handle_.Pass()); |
+ client_handle_.Pass().release().ToPlaformFile(); |
did_activate_ = sender->Send(new MojoMsg_Activate( |
IPC::GetFileHandleForProcess(client_file, process_handle, true))); |
} |