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

Unified Diff: content/browser/utility_process_host_impl.cc

Issue 1959313002: Use ChannelMojo for the utility process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-all-processes
Patch Set: rebase Created 4 years, 6 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 | « no previous file | content/child/child_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/utility_process_host_impl.cc
diff --git a/content/browser/utility_process_host_impl.cc b/content/browser/utility_process_host_impl.cc
index 04dcd920b587022034389604f121c96a538538d0..1f42156297057836536fd41d277783f8e66c6abd 100644
--- a/content/browser/utility_process_host_impl.cc
+++ b/content/browser/utility_process_host_impl.cc
@@ -256,8 +256,9 @@ bool UtilityProcessHostImpl::StartProcess() {
child_token_));
process_->SetName(name_);
- std::string channel_id = process_->GetHost()->CreateChannel();
- if (channel_id.empty()) {
+ std::string mojo_channel_token =
+ process_->GetHost()->CreateChannelMojo(child_token_);
+ if (mojo_channel_token.empty()) {
NotifyAndDelete(LAUNCH_RESULT_FAILURE);
return false;
}
@@ -268,9 +269,9 @@ bool UtilityProcessHostImpl::StartProcess() {
// support single process mode this way.
in_process_thread_.reset(
g_utility_main_thread_factory(InProcessChildThreadParams(
- channel_id, BrowserThread::UnsafeGetMessageLoopForThread(
+ std::string(), BrowserThread::UnsafeGetMessageLoopForThread(
BrowserThread::IO)->task_runner(),
- std::string(), mojo_application_host_->GetToken())));
+ mojo_channel_token, mojo_application_host_->GetToken())));
in_process_thread_->Start();
} else {
const base::CommandLine& browser_command_line =
@@ -307,7 +308,8 @@ bool UtilityProcessHostImpl::StartProcess() {
cmd_line->AppendSwitchASCII(switches::kProcessType,
switches::kUtilityProcess);
- cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
+ cmd_line->AppendSwitchASCII(switches::kMojoChannelToken,
+ mojo_channel_token);
std::string locale = GetContentClient()->browser()->GetApplicationLocale();
cmd_line->AppendSwitchASCII(switches::kLang, locale);
« no previous file with comments | « no previous file | content/child/child_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698