1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
--- sandbox/policy/sandbox_type.cc.orig 2022-06-17 14:20:10 UTC
+++ sandbox/policy/sandbox_type.cc
@@ -39,7 +39,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) {
#endif
case Sandbox::kAudio:
return false;
-#if BUILDFLAG(IS_FUCHSIA)
+#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
case Sandbox::kVideoCapture:
return false;
#endif
@@ -62,7 +62,7 @@ bool IsUnsandboxedSandboxType(Sandbox sandbox_type) {
case Sandbox::kMirroring:
case Sandbox::kNaClLoader:
#endif
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
case Sandbox::kHardwareVideoDecoding:
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS_ASH)
@@ -127,7 +127,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi
#endif
case Sandbox::kPrintCompositor:
case Sandbox::kAudio:
-#if BUILDFLAG(IS_FUCHSIA)
+#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
case Sandbox::kVideoCapture:
#endif
#if BUILDFLAG(IS_WIN)
@@ -138,7 +138,7 @@ void SetCommandLineFlagsForSandboxType(base::CommandLi
case Sandbox::kMediaFoundationCdm:
case Sandbox::kWindowsSystemProxyResolver:
#endif // BUILDFLAG(IS_WIN)
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
case Sandbox::kHardwareVideoDecoding:
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
#if BUILDFLAG(IS_CHROMEOS_ASH)
@@ -257,7 +257,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb
return switches::kUtilitySandbox;
case Sandbox::kAudio:
return switches::kAudioSandbox;
-#if BUILDFLAG(IS_FUCHSIA)
+#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
case Sandbox::kVideoCapture:
return switches::kVideoCaptureSandbox;
#endif
@@ -287,7 +287,7 @@ std::string StringFromUtilitySandboxType(Sandbox sandb
case Sandbox::kMirroring:
return switches::kMirroringSandbox;
#endif
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
case Sandbox::kHardwareVideoDecoding:
return switches::kHardwareVideoDecodingSandbox;
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
@@ -375,11 +375,11 @@ sandbox::mojom::Sandbox UtilitySandboxTypeFromString(
if (sandbox_string == switches::kScreenAISandbox)
return Sandbox::kScreenAI;
#endif
-#if BUILDFLAG(IS_FUCHSIA)
+#if BUILDFLAG(IS_FUCHSIA) || BUILDFLAG(IS_BSD)
if (sandbox_string == switches::kVideoCaptureSandbox)
return Sandbox::kVideoCapture;
#endif
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
if (sandbox_string == switches::kHardwareVideoDecodingSandbox)
return Sandbox::kHardwareVideoDecoding;
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH)
|