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..591557a8880041078423f17a2303ec17d4ec726b 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().platform_file(), |
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
if (!message_pipe.is_valid()) |
return false; |
@@ -52,8 +40,7 @@ void MojoApplicationHost::Activate(IPC::Sender* sender, |
DCHECK(!did_activate_); |
DCHECK(client_handle_.is_valid()); |
- base::PlatformFile client_file = |
- PlatformFileFromScopedPlatformHandle(client_handle_.Pass()); |
+ base::PlatformFile client_file = client_handle_.release().platform_file(); |
did_activate_ = sender->Send(new MojoMsg_Activate( |
IPC::GetFileHandleForProcess(client_file, process_handle, true))); |
} |