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

Unified Diff: ipc/mojo/ipc_channel_mojo.cc

Issue 555503007: Cleanup: Get rid of OS_WIN/OS_POSIX ifdefs from MojoApplication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated 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: ipc/mojo/ipc_channel_mojo.cc
diff --git a/ipc/mojo/ipc_channel_mojo.cc b/ipc/mojo/ipc_channel_mojo.cc
index 71c373e01cf07a63708871ae3077c121fc0f3e31..65830f485a5b1baf9a53ca4e39515bb1ba3b813d 100644
--- a/ipc/mojo/ipc_channel_mojo.cc
+++ b/ipc/mojo/ipc_channel_mojo.cc
@@ -72,17 +72,6 @@ class MojoChannelFactory : public ChannelFactory {
scoped_refptr<base::TaskRunner> io_thread_task_runner_;
};
-mojo::embedder::PlatformHandle ToPlatformHandle(
- const ChannelHandle& handle) {
-#if defined(OS_POSIX) && !defined(OS_NACL)
- return mojo::embedder::PlatformHandle(handle.socket.fd);
-#elif defined(OS_WIN)
- return mojo::embedder::PlatformHandle(handle.pipe.handle);
-#else
-#error "Unsupported Platform!"
-#endif
-}
-
} // namespace
//------------------------------------------------------------------------------
@@ -140,7 +129,8 @@ void ChannelMojo::InitOnIOThread() {
mojo::ScopedMessagePipeHandle control_pipe =
mojo::embedder::CreateChannelOnIOThread(
mojo::embedder::ScopedPlatformHandle(
- ToPlatformHandle(bootstrap_->TakePipeHandle())),
+ mojo::embedder::PlatformHandle(
+ bootstrap_->TakePipeHandle().platform_file())),
&channel_info);
channel_info_.reset(channel_info);

Powered by Google App Engine
This is Rietveld 408576698