blob: b3853eda0fc4fd034b143c6aff2765fd403eaa60 (
plain) (
blame)
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
|
--- services/on_device_model/pre_sandbox_init.cc.orig 2025-01-27 17:37:37 UTC
+++ services/on_device_model/pre_sandbox_init.cc
@@ -14,7 +14,7 @@
#include "services/on_device_model/ml/chrome_ml.h" // nogncheck
#endif
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
#include "gpu/config/gpu_info_collector.h" // nogncheck
#include "third_party/dawn/include/dawn/dawn_proc.h" // nogncheck
#include "third_party/dawn/include/dawn/native/DawnNative.h" // nogncheck
@@ -25,7 +25,7 @@ namespace {
namespace {
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
constexpr uint32_t kVendorIdAMD = 0x1002;
constexpr uint32_t kVendorIdIntel = 0x8086;
constexpr uint32_t kVendorIdNVIDIA = 0x10DE;
@@ -74,7 +74,7 @@ bool OnDeviceModelService::PreSandboxInit() {
}
#endif
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
// Warm any relevant drivers before attempting to bring up the sandbox. For
// good measure we initialize a device instance for any adapter with an
// appropriate backend on top of any integrated or discrete GPU.
@@ -102,7 +102,7 @@ bool OnDeviceModelService::PreSandboxInit() {
return true;
}
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
// static
void OnDeviceModelService::AddSandboxLinuxOptions(
sandbox::policy::SandboxLinux::Options& options) {
|