#include "base/base_paths.h"
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/native_library.h"
#include "base/path_service.h"
#include "build/build_config.h"
#include "services/on_device_model/on_device_model_service.h"
#if defined(ENABLE_ML_INTERNAL)
#include "services/on_device_model/ml/chrome_ml.h"
#endif
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
#include "gpu/config/gpu_info_collector.h"
#include "third_party/dawn/include/dawn/dawn_proc.h"
#include "third_party/dawn/include/dawn/native/DawnNative.h"
#include "third_party/dawn/include/dawn/webgpu_cpp.h"
#endif
namespace on_device_model {
namespace {
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
constexpr uint32_t kVendorIdAMD = …;
constexpr uint32_t kVendorIdIntel = …;
constexpr uint32_t kVendorIdNVIDIA = …;
constexpr uint32_t kVendorIdVirtIO = …;
void UpdateSandboxOptionsForGpu(
const gpu::GPUInfo::GPUDevice& device,
sandbox::policy::SandboxLinux::Options& options) { … }
#endif
}
bool OnDeviceModelService::PreSandboxInit() { … }
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
void OnDeviceModelService::AddSandboxLinuxOptions(
sandbox::policy::SandboxLinux::Options& options) { … }
#endif
bool OnDeviceModelService::Shutdown() { … }
}