aboutsummaryrefslogtreecommitdiff
path: root/devel/electron29/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'devel/electron29/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc')
-rw-r--r--devel/electron29/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc92
1 files changed, 92 insertions, 0 deletions
diff --git a/devel/electron29/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc b/devel/electron29/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc
new file mode 100644
index 000000000000..ee0514e14084
--- /dev/null
+++ b/devel/electron29/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc
@@ -0,0 +1,92 @@
+--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2024-02-21 00:20:34 UTC
++++ chrome/browser/metrics/chrome_metrics_service_client.cc
+@@ -191,7 +191,7 @@
+ #include "chrome/notification_helper/notification_helper_constants.h"
+ #endif
+
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ #include "components/metrics/motherboard_metrics_provider.h"
+ #endif
+
+@@ -208,7 +208,7 @@
+ #include "chrome/browser/metrics/power/power_metrics_provider_mac.h"
+ #endif
+
+-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "chrome/browser/metrics/bluetooth_metrics_provider.h"
+ #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+
+@@ -581,7 +581,7 @@ void ChromeMetricsServiceClient::RegisterPrefs(PrefReg
+ #endif // BUILDFLAG(IS_CHROMEOS_ASH)
+
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \
+- BUILDFLAG(IS_MAC)
++ BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+ metrics::structured::StructuredMetricsService::RegisterPrefs(registry);
+
+ #if !BUILDFLAG(IS_CHROMEOS_ASH)
+@@ -767,7 +767,7 @@ void ChromeMetricsServiceClient::Initialize() {
+ RegisterUKMProviders();
+ }
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+- BUILDFLAG(IS_CHROMEOS_ASH)
++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ metrics::structured::Recorder::GetInstance()->SetUiTaskRunner(
+ base::SequencedTaskRunner::GetCurrentDefault());
+ #endif
+@@ -814,7 +814,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic
+ metrics_service_->RegisterMetricsProvider(
+ std::make_unique<metrics::CPUMetricsProvider>());
+
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ metrics_service_->RegisterMetricsProvider(
+ std::make_unique<metrics::MotherboardMetricsProvider>());
+ #endif
+@@ -899,7 +899,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \
+- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD)
+ metrics_service_->RegisterMetricsProvider(
+ std::make_unique<DesktopPlatformFeaturesMetricsProvider>());
+ #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX) ||
+@@ -1009,7 +1009,7 @@ void ChromeMetricsServiceClient::RegisterMetricsServic
+ std::make_unique<PowerMetricsProvider>());
+ #endif
+
+-#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
++#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD)
+ metrics_service_->RegisterMetricsProvider(
+ metrics::CreateDesktopSessionMetricsProvider());
+ #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_LINUX)
+@@ -1174,7 +1174,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve
+ }
+
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || \
+- BUILDFLAG(IS_CHROMEOS_ASH)
++ BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_BSD)
+ // Begin initializing the structured metrics system. Initialization must wait
+ // until a profile is added, because it reads keys stored within the user's
+ // cryptohome. We only initialize for profiles that are valid candidates
+@@ -1205,7 +1205,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve
+ // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
+ // of lacros-chrome is complete.
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \
+- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
++ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) || BUILDFLAG(IS_BSD)
+ // This creates the DesktopProfileSessionDurationsServices if it didn't exist
+ // already.
+ metrics::DesktopProfileSessionDurationsServiceFactory::GetForBrowserContext(
+@@ -1548,7 +1548,7 @@ void ChromeMetricsServiceClient::CreateStructuredMetri
+ recorder =
+ std::make_unique<metrics::structured::AshStructuredMetricsRecorder>(
+ cros_system_profile_provider_.get());
+-#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
++#elif BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
+
+ // Make sure that Structured Metrics recording delegates have been created
+ // before the service is created. This is handled in other places for ChromeOS