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

Unified Diff: content/common/sandbox_linux/bpf_gpu_policy_linux.cc

Issue 176883018: Remove additional protection of kDisableAcceleratedVideoDecode in bpf_gpu_policy_linux.cc. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: set kDisableAcceleratedVideoDecode no matther what, unless defined(OS_CHROMEOS) || defined(OS_WIN) … Created 6 years, 9 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
Index: content/common/sandbox_linux/bpf_gpu_policy_linux.cc
diff --git a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
index 2460f02b65febb15e848fcba0a8315eaa2208906..8780e1e0274490177a8eea3802190054fc27ec39 100644
--- a/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_gpu_policy_linux.cc
@@ -72,18 +72,6 @@ inline bool IsArchitectureArm() {
#endif
}
-bool IsAcceleratedVideoDecodeEnabled() {
- // Accelerated video decode is currently enabled on Chrome OS,
Jorge Lucangeli Obes 2014/03/06 15:53:59 Let's simplify this function to: CommandLine::ForC
- // but not on Linux: crbug.com/137247.
- bool is_enabled = IsChromeOS();
-
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- is_enabled &=
- !command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode);
-
- return is_enabled;
-}
-
intptr_t GpuSIGSYS_Handler(const struct arch_seccomp_data& args,
void* aux_broker_process) {
RAW_CHECK(aux_broker_process);
@@ -214,7 +202,8 @@ bool GpuProcessPolicy::PreSandboxHook() {
if (IsArchitectureX86_64() || IsArchitectureI386()) {
// Accelerated video decode dlopen()'s some shared objects
// inside the sandbox, so preload them now.
- if (IsAcceleratedVideoDecodeEnabled()) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableAcceleratedVideoDecode)) {
const char* I965DrvVideoPath = NULL;
if (IsArchitectureX86_64()) {

Powered by Google App Engine
This is Rietveld 408576698