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

Unified Diff: content/common/sandbox_policy.cc

Issue 7517012: Turn on UIPI for the GPU sandbox. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | « chrome/chrome_dll.gypi ('k') | ui/gfx/gl/gl_implementation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_policy.cc
===================================================================
--- content/common/sandbox_policy.cc (revision 93936)
+++ content/common/sandbox_policy.cc (working copy)
@@ -21,6 +21,7 @@
#include "content/common/child_process_info.h"
#include "content/common/debug_flags.h"
#include "sandbox/src/sandbox.h"
+#include "ui/gfx/gl/gl_switches.h"
static sandbox::BrokerServices* g_broker_services = NULL;
@@ -279,13 +280,17 @@
// desktop.
// TODO(cpu): Lock down the sandbox more if possible.
// TODO(apatrick): Use D3D9Ex to render windowless.
-bool AddPolicyForGPU(CommandLine*, sandbox::TargetPolicy* policy) {
+bool AddPolicyForGPU(CommandLine* cmd_line, sandbox::TargetPolicy* policy) {
policy->SetJobLevel(sandbox::JOB_UNPROTECTED, 0);
if (base::win::GetVersion() > base::win::VERSION_XP) {
policy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS,
sandbox::USER_LIMITED);
- policy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW);
+ if (cmd_line->GetSwitchValueASCII(switches::kUseGL) ==
+ gfx::kGLImplementationDesktopName)
+ policy->SetDelayedIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW);
+ else
+ policy->SetIntegrityLevel(sandbox::INTEGRITY_LEVEL_LOW);
} else {
policy->SetTokenLevel(sandbox::USER_UNPROTECTED,
sandbox::USER_LIMITED);
« no previous file with comments | « chrome/chrome_dll.gypi ('k') | ui/gfx/gl/gl_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698