1 --- src/3rdparty/chromium/components/metrics/metrics_log.cc.orig 2025-08-15 18:30:00 UTC 2 +++ src/3rdparty/chromium/components/metrics/metrics_log.cc 3 @@ -61,7 +61,7 @@ 4 #include "base/win/current_module.h" 5 #endif 6 7 -#if BUILDFLAG(IS_LINUX) 8 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) 9 #include "base/environment.h" 10 #include "base/nix/xdg_util.h" 11 #endif 12 @@ -157,7 +157,7 @@ void RecordCurrentTime( 13 } 14 } 15 16 -#if BUILDFLAG(IS_LINUX) 17 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) 18 metrics::SystemProfileProto::OS::XdgSessionType ToProtoSessionType( 19 base::nix::SessionType session_type) { 20 switch (session_type) { 21 @@ -435,7 +435,7 @@ void MetricsLog::RecordCoreSystemProfile( 22 // OperatingSystemVersion refers to the ChromeOS release version. 23 #if BUILDFLAG(IS_CHROMEOS) 24 os->set_kernel_version(base::SysInfo::KernelVersion()); 25 -#elif BUILDFLAG(IS_LINUX) 26 +#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) 27 // Linux operating system version is copied over into kernel version to be 28 // consistent. 29 os->set_kernel_version(base::SysInfo::OperatingSystemVersion()); 30 @@ -452,7 +452,7 @@ void MetricsLog::RecordCoreSystemProfile( 31 os->set_build_number(base::SysInfo::GetIOSBuildNumber()); 32 #endif 33 34 -#if BUILDFLAG(IS_LINUX) 35 +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) 36 std::unique_ptr<base::Environment> env = base::Environment::Create(); 37 os->set_xdg_session_type(ToProtoSessionType(base::nix::GetSessionType(*env))); 38 os->set_xdg_current_desktop( 39