Index: content/browser/child_process_launcher.cc |
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc |
index 36f0c5098c7207548f6ebf73ae41f2bf63daad27..6b88b049946b6e3165a108430f2bb2949814d283 100644 |
--- a/content/browser/child_process_launcher.cc |
+++ b/content/browser/child_process_launcher.cc |
@@ -25,8 +25,6 @@ |
#include "content/public/common/result_codes.h" |
#include "content/public/common/sandboxed_process_launcher_delegate.h" |
#include "mojo/edk/embedder/embedder.h" |
-#include "mojo/edk/embedder/named_platform_channel_pair.h" |
-#include "mojo/edk/embedder/platform_channel_pair.h" |
#include "mojo/edk/embedder/scoped_platform_handle.h" |
#if defined(OS_WIN) |
@@ -144,8 +142,9 @@ |
base::Process process; |
#if defined(OS_WIN) |
if (launch_elevated) { |
- // When establishing a Mojo connection, the pipe path has already been added |
- // to the command line. |
+ // TODO(rockot): We may want to support Mojo IPC to elevated processes as |
+ // well, but this isn't currently feasible without sharing a pipe path on |
+ // the command line as elevated process launch goes through ShellExecuteEx. |
base::LaunchOptions options; |
options.start_hidden = true; |
process = base::LaunchElevatedProcess(*cmd_line, options); |
@@ -455,19 +454,8 @@ |
NotifyCallback reply_callback(base::Bind(&ChildProcessLauncher::DidLaunch, |
weak_factory_.GetWeakPtr(), |
terminate_child_on_shutdown_)); |
- mojo::edk::ScopedPlatformHandle client_handle; |
-#if defined(OS_WIN) |
- if (delegate->ShouldLaunchElevated()) { |
- mojo::edk::NamedPlatformChannelPair named_pair; |
- mojo_host_platform_handle_ = named_pair.PassServerHandle(); |
- named_pair.PrepareToPassClientHandleToChildProcess(cmd_line); |
- } else |
-#endif |
- { |
- mojo::edk::PlatformChannelPair channel_pair; |
- mojo_host_platform_handle_ = channel_pair.PassServerHandle(); |
- client_handle = channel_pair.PassClientHandle(); |
- } |
+ mojo::edk::ScopedPlatformHandle client_handle = |
+ mojo_platform_channel_.PassClientHandle(); |
BrowserThread::PostTask( |
BrowserThread::PROCESS_LAUNCHER, FROM_HERE, |
base::Bind(&LaunchOnLauncherThread, reply_callback, client_thread_id_, |
@@ -557,7 +545,7 @@ |
if (process_.IsValid()) { |
// Set up Mojo IPC to the new process. |
mojo::edk::ChildProcessLaunched(process_.Handle(), |
- std::move(mojo_host_platform_handle_)); |
+ mojo_platform_channel_.PassServerHandle()); |
} |
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |