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

Unified Diff: content/common/gpu/media/vt_video_decode_accelerator.cc

Issue 414843002: Explicitly check for --no-sandbox in VT VDA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo. Created 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/vt_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/vt_video_decode_accelerator.cc b/content/common/gpu/media/vt_video_decode_accelerator.cc
index 7745e6dfb999aacc259f50033d856d2aded7d28a..26c7c36e4339ba56b964c64bf02bfb2dac5ae7e8 100644
--- a/content/common/gpu/media/vt_video_decode_accelerator.cc
+++ b/content/common/gpu/media/vt_video_decode_accelerator.cc
@@ -6,8 +6,10 @@
#include <OpenGL/CGLIOSurface.h>
#include "base/bind.h"
+#include "base/command_line.h"
#include "base/thread_task_runner_handle.h"
#include "content/common/gpu/media/vt_video_decode_accelerator.h"
+#include "content/public/common/content_switches.h"
#include "media/filters/h264_parser.h"
using content_common_gpu_media::kModuleVt;
@@ -62,8 +64,11 @@ bool VTVideoDecodeAccelerator::Initialize(
if (profile < media::H264PROFILE_MIN || profile > media::H264PROFILE_MAX)
return false;
- // TODO(sandersd): Move VideoToolbox library loading to sandbox startup;
- // until then, --no-sandbox is required.
+ // Require --no-sandbox until VideoToolbox library loading is part of sandbox
+ // startup (and this VDA is ready for regular users).
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoSandbox))
+ return false;
+
if (!IsVtInitialized()) {
StubPathMap paths;
// CoreVideo is also required, but the loader stops after the first
@@ -80,7 +85,6 @@ bool VTVideoDecodeAccelerator::Initialize(
if (!decoder_thread_.Start())
return false;
- // Note that --ignore-gpu-blacklist is still required to get here.
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698