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
71
|
$OpenBSD: patch-content_public_common_content_features_cc,v 1.27 2021/11/16 11:28:46 robert Exp $
Index: content/public/common/content_features.cc
--- content/public/common/content_features.cc.orig
+++ content/public/common/content_features.cc
@@ -49,7 +49,7 @@ const base::Feature kAudioServiceOutOfProcess {
"AudioServiceOutOfProcess",
// TODO(crbug.com/1052397): Remove !IS_CHROMEOS_LACROS once lacros starts being
// built with OS_CHROMEOS instead of OS_LINUX.
-#if defined(OS_WIN) || defined(OS_MAC) || \
+#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_BSD) || \
(defined(OS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS))
base::FEATURE_ENABLED_BY_DEFAULT
#else
@@ -61,7 +61,7 @@ const base::Feature kAudioServiceOutOfProcess {
// kAudioServiceOutOfProcess feature is enabled.
const base::Feature kAudioServiceSandbox {
"AudioServiceSandbox",
-#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_FUCHSIA)
+#if defined(OS_WIN) || defined(OS_MAC) || defined(OS_FUCHSIA) || defined(OS_BSD)
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT
@@ -902,7 +902,7 @@ const base::Feature kWebAssemblyBaseline{"WebAssemblyB
const base::Feature kWebAssemblyCodeProtection{
"WebAssemblyCodeProtection", base::FEATURE_DISABLED_BY_DEFAULT};
-#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(ARCH_CPU_X86_64)
+#if (defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)) && defined(ARCH_CPU_X86_64)
// Use memory protection keys in userspace (PKU) (if available) to protect code
// JITed for WebAssembly. Fall back to traditional memory protection if
// WebAssemblyCodeProtection is also enabled.
@@ -928,7 +928,7 @@ const base::Feature kWebAssemblyTiering{"WebAssemblyTi
const base::Feature kWebAssemblyTrapHandler {
"WebAssemblyTrapHandler",
#if (defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN) || \
- defined(OS_MAC)) && \
+ defined(OS_BSD) || defined(OS_MAC)) && \
defined(ARCH_CPU_X86_64)
base::FEATURE_ENABLED_BY_DEFAULT
#else
@@ -954,7 +954,7 @@ const base::Feature kWebAuthCable {
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
// of lacros-chrome is complete.
// If updating this, also update kWebAuthCableServerLink.
-#if BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_LINUX)
+#if BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_LINUX) || defined(OS_BSD)
base::FEATURE_DISABLED_BY_DEFAULT
#else
base::FEATURE_ENABLED_BY_DEFAULT
@@ -1024,7 +1024,11 @@ const base::Feature kWebUIReportOnlyTrustedTypes{
// Controls whether the WebUSB API is enabled:
// https://wicg.github.io/webusb
+#if defined(OS_BSD)
+const base::Feature kWebUsb{"WebUSB", base::FEATURE_DISABLED_BY_DEFAULT};
+#else
const base::Feature kWebUsb{"WebUSB", base::FEATURE_ENABLED_BY_DEFAULT};
+#endif
// Controls whether the WebXR Device API is enabled.
const base::Feature kWebXr{"WebXR", base::FEATURE_ENABLED_BY_DEFAULT};
@@ -1094,7 +1098,7 @@ const base::Feature kRetryGetVideoCaptureDeviceInfos{
#endif // defined(OS_MAC)
-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
// If the JavaScript on a WebUI page has an error (such as an unhandled
// exception), report that error back the crash reporting infrastructure, same
// as we do for program crashes.
|