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

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: Created 4 years, 7 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') | content/common/child_process_host_impl.cc » ('J')
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 4a05b3f21d7fbaaac3276d72db1f27ccf2c21c72..ead9a34da363ef29bad5843e0cda36355241a00e 100644
--- a/content/browser/utility_process_host_impl.cc
+++ b/content/browser/utility_process_host_impl.cc
@@ -253,8 +253,8 @@ bool UtilityProcessHostImpl::StartProcess() {
process_.reset(new BrowserChildProcessHostImpl(PROCESS_TYPE_UTILITY, this));
process_->SetName(name_);
- std::string channel_id = process_->GetHost()->CreateChannel();
- if (channel_id.empty()) {
+ std::string mojo_channel_token = process_->GetHost()->CreateChannelMojo();
+ if (mojo_channel_token.empty()) {
NotifyAndDelete(LAUNCH_RESULT_FAILURE);
return false;
}
@@ -265,9 +265,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 =
@@ -304,7 +304,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') | content/common/child_process_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698