$OpenBSD: patch-chrome_browser_metrics_chrome_browser_main_extra_parts_metrics_cc,v 1.30 2021/11/16 11:28:46 robert Exp $

Index: chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig
+++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
@@ -60,8 +60,10 @@
 
 // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
 // of lacros-chrome is complete.
-#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
+#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) || defined(OS_BSD)
+#if !defined(OS_BSD)
 #include <gnu/libc-version.h>
+#endif
 
 #include "base/linux_util.h"
 #include "base/strings/string_split.h"
@@ -222,6 +224,7 @@ void RecordStartupMetrics() {
   base::UmaHistogramBoolean("Windows.ApplockerRunning", IsApplockerRunning());
 #endif  // defined(OS_WIN)
 
+#if !defined(OS_BSD)
   // TODO(crbug.com/1216328) Remove logging.
   LOG(ERROR) << "crbug.com/1216328: Checking Bluetooth availability started. "
                 "Please report if there is no report that this ends.";
@@ -231,6 +234,7 @@ void RecordStartupMetrics() {
   // Record whether Chrome is the default browser or not.
   LOG(ERROR) << "crbug.com/1216328: Checking default browser status started. "
                 "Please report if there is no report that this ends.";
+#endif
   shell_integration::DefaultWebClientState default_state =
       shell_integration::GetDefaultBrowser();
   LOG(ERROR) << "crbug.com/1216328: Checking default browser status ended.";
