SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
39
www/chromium/patches/patch-components_metrics_metrics_log_cc
Normal file
39
www/chromium/patches/patch-components_metrics_metrics_log_cc
Normal file
|
@ -0,0 +1,39 @@
|
|||
Index: components/metrics/metrics_log.cc
|
||||
--- components/metrics/metrics_log.cc.orig
|
||||
+++ components/metrics/metrics_log.cc
|
||||
@@ -52,7 +52,7 @@
|
||||
#include "base/win/current_module.h"
|
||||
#endif
|
||||
|
||||
-#if BUILDFLAG(IS_LINUX)
|
||||
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
|
||||
#include "base/environment.h"
|
||||
#include "base/nix/xdg_util.h"
|
||||
#endif
|
||||
@@ -130,7 +130,7 @@ void RecordCurrentTime(
|
||||
}
|
||||
}
|
||||
|
||||
-#if BUILDFLAG(IS_LINUX)
|
||||
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
|
||||
metrics::SystemProfileProto::OS::XdgSessionType ToProtoSessionType(
|
||||
base::nix::SessionType session_type) {
|
||||
switch (session_type) {
|
||||
@@ -390,7 +390,7 @@ void MetricsLog::RecordCoreSystemProfile(
|
||||
// OperatingSystemVersion refers to the ChromeOS release version.
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
os->set_kernel_version(base::SysInfo::KernelVersion());
|
||||
-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_BSD)
|
||||
// Linux operating system version is copied over into kernel version to be
|
||||
// consistent.
|
||||
os->set_kernel_version(base::SysInfo::OperatingSystemVersion());
|
||||
@@ -407,7 +407,7 @@ void MetricsLog::RecordCoreSystemProfile(
|
||||
os->set_build_number(base::SysInfo::GetIOSBuildNumber());
|
||||
#endif
|
||||
|
||||
-#if BUILDFLAG(IS_LINUX)
|
||||
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
|
||||
std::unique_ptr<base::Environment> env = base::Environment::Create();
|
||||
os->set_xdg_session_type(ToProtoSessionType(base::nix::GetSessionType(*env)));
|
||||
os->set_xdg_current_desktop(
|
Loading…
Add table
Add a link
Reference in a new issue