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

Unified Diff: content/browser/gpu/gpu_process_host.cc

Issue 2124143003: Revert of Use ChannelMojo for the Browser-GPU IPC channel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/gpu/gpu_child_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 9cb3b2a8d0a20ef34b448bbc99986c9ef282220d..dc2707091adb658ea7ec34b7cd7860bf8a2a3404 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -552,9 +552,8 @@
TRACE_EVENT_INSTANT0("gpu", "LaunchGpuProcess", TRACE_EVENT_SCOPE_THREAD);
- const std::string mojo_channel_token =
- process_->GetHost()->CreateChannelMojo(child_token_);
- if (mojo_channel_token.empty())
+ std::string channel_id = process_->GetHost()->CreateChannel();
+ if (channel_id.empty())
return false;
DCHECK(!mojo_child_connection_);
@@ -570,8 +569,8 @@
DCHECK(g_gpu_main_thread_factory);
in_process_gpu_thread_.reset(g_gpu_main_thread_factory(
InProcessChildThreadParams(
- std::string(), base::ThreadTaskRunnerHandle::Get(),
- mojo_channel_token, mojo_child_connection_->service_token()),
+ channel_id, base::ThreadTaskRunnerHandle::Get(), std::string(),
+ mojo_child_connection_->service_token()),
gpu_preferences));
base::Thread::Options options;
#if defined(OS_WIN)
@@ -584,7 +583,7 @@
in_process_gpu_thread_->StartWithOptions(options);
OnProcessLaunched(); // Fake a callback that the process is ready.
- } else if (!LaunchGpuProcess(mojo_channel_token, &gpu_preferences)) {
+ } else if (!LaunchGpuProcess(channel_id, &gpu_preferences)) {
return false;
}
@@ -957,7 +956,7 @@
Send(new GpuMsg_Finalize());
}
-bool GpuProcessHost::LaunchGpuProcess(const std::string& mojo_channel_token,
+bool GpuProcessHost::LaunchGpuProcess(const std::string& channel_id,
gpu::GpuPreferences* gpu_preferences) {
if (!(gpu_enabled_ &&
GpuDataManagerImpl::GetInstance()->ShouldUseSwiftShader()) &&
@@ -993,7 +992,7 @@
base::CommandLine* cmd_line = new base::CommandLine(exe_path);
#endif
cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess);
- cmd_line->AppendSwitchASCII(switches::kMojoChannelToken, mojo_channel_token);
+ cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
cmd_line->AppendSwitchASCII(switches::kMojoApplicationChannelToken,
mojo_child_connection_->service_token());
BrowserChildProcessHostImpl::CopyFeatureAndFieldTrialFlags(cmd_line);
« no previous file with comments | « no previous file | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698