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

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

Issue 9212054: Fix DirectX diagnostic collection for about:gpu page. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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/gpu/gpu_process_host.h ('k') | content/common/sandbox_policy.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
===================================================================
--- content/browser/gpu/gpu_process_host.cc (revision 118516)
+++ content/browser/gpu/gpu_process_host.cc (working copy)
@@ -200,6 +200,9 @@
!it.IsAtEnd(); it.Advance()) {
GpuProcessHost *host = it.GetCurrentValue();
+ if (host->sandboxed() != (client_id != 0))
+ continue;
+
if (HostIsValid(host))
return host;
}
@@ -214,7 +217,7 @@
cause,
content::CAUSE_FOR_GPU_LAUNCH_MAX_ENUM);
- GpuProcessHost* host = new GpuProcessHost(host_id);
+ GpuProcessHost* host = new GpuProcessHost(host_id, client_id != 0);
if (host->Init())
return host;
@@ -246,11 +249,12 @@
return NULL;
}
-GpuProcessHost::GpuProcessHost(int host_id)
+GpuProcessHost::GpuProcessHost(int host_id, bool sandboxed)
: host_id_(host_id),
gpu_process_(base::kNullProcessHandle),
in_process_(false),
- software_rendering_(false) {
+ software_rendering_(false),
+ sandboxed_(sandboxed) {
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess) ||
CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessGPU))
in_process_ = true;
@@ -518,6 +522,10 @@
return software_rendering_;
}
+bool GpuProcessHost::sandboxed() {
+ return sandboxed_;
+}
+
void GpuProcessHost::ForceShutdown() {
g_hosts_by_id.Pointer()->Remove(host_id_);
process_->ForceShutdown();
@@ -550,6 +558,9 @@
cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kGpuProcess);
cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id);
+ if (!sandboxed_)
+ cmd_line->AppendSwitch(switches::kDisableGpuSandbox);
+
// Propagate relevant command line switches.
static const char* const kSwitchNames[] = {
switches::kDisableBreakpad,
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/common/sandbox_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698