Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1232)

Unified Diff: content/browser/mojo/mojo_application_host.cc

Issue 553283002: IPC::ChannelMojo: Introduce IPC::MojoBootstrap for Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing windows build error Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 3af797499e0b809e1652411e8670ab62f14ac26e..673f6dea594d25bb9f272453d63fbea838229f46 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 @@ bool 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)));
return did_activate_;

Powered by Google App Engine
This is Rietveld 408576698