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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2243533002: Revert of Revert renderer IPC::Channel acquisition via shell connection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 10612ce9b76a31afc51f725317be55b51ced954a..0ce8b2249b2afb8c3331cf302b1678e93a37ee81 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -834,7 +834,7 @@
g_renderer_main_thread_factory(InProcessChildThreadParams(
channel_id,
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
- channel_token_, mojo_child_connection_->service_token())));
+ std::string(), mojo_child_connection_->service_token())));
base::Thread::Options options;
#if defined(OS_WIN) && !defined(OS_MACOSX)
@@ -894,11 +894,11 @@
const std::string& channel_id) {
scoped_refptr<base::SingleThreadTaskRunner> runner =
BrowserThread::GetTaskRunnerForThread(BrowserThread::IO);
- channel_token_ = mojo::edk::GenerateRandomToken();
- mojo::ScopedMessagePipeHandle handle =
- mojo::edk::CreateParentMessagePipe(channel_token_, child_token_);
+ IPC::mojom::ChannelBootstrapPtr bootstrap;
+ GetRemoteInterfaces()->GetInterface(&bootstrap);
std::unique_ptr<IPC::ChannelFactory> channel_factory =
- IPC::ChannelMojo::CreateServerFactory(std::move(handle), runner);
+ IPC::ChannelMojo::CreateServerFactory(
+ bootstrap.PassInterface().PassHandle(), runner);
// Do NOT expand ifdef or run time condition checks here! Synchronous
// IPCs from browser process are banned. It is only narrowly allowed
@@ -1433,11 +1433,6 @@
#endif
AppendCompositorCommandLineFlags(command_line);
-
- if (!channel_token_.empty()) {
- command_line->AppendSwitchASCII(
- switches::kMojoChannelToken, channel_token_);
- }
command_line->AppendSwitchASCII(switches::kMojoApplicationChannelToken,
mojo_child_connection_->service_token());
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698