-
Notifications
You must be signed in to change notification settings - Fork 869
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
chromium_src/chrome/browser/metrics/chrome_metrics_service_client.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* Copyright (c) 2024 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at https://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "chrome/browser/metrics/chrome_metrics_service_client.h" | ||
|
||
#define ChromeMetricsServiceClient ChromeMetricsServiceClient_ChromiumImpl | ||
#include "src/chrome/browser/metrics/chrome_metrics_service_client.cc" | ||
#undef ChromeMetricsServiceClient | ||
|
||
void ChromeMetricsServiceClient::RegisterMetricsServiceProviders() { | ||
// Do nothing. | ||
} | ||
|
||
void ChromeMetricsServiceClient::RegisterUKMProviders() { | ||
// Do nothing. | ||
} |
21 changes: 21 additions & 0 deletions
21
chromium_src/chrome/browser/metrics/chrome_metrics_service_client.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* Copyright (c) 2024 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at https://mozilla.org/MPL/2.0/. */ | ||
#ifndef BRAVE_CHROMIUM_SRC_CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ | ||
#define BRAVE_CHROMIUM_SRC_CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ | ||
|
||
#define ChromeMetricsServiceClient ChromeMetricsServiceClient_ChromiumImpl | ||
#define RegisterMetricsServiceProviders virtual RegisterMetricsServiceProviders | ||
#include "src/chrome/browser/metrics/chrome_metrics_service_client.h" // IWYU pragma: export | ||
#undef RegisterMetricsServiceProviders | ||
#undef ChromeMetricsServiceClient | ||
|
||
class ChromeMetricsServiceClient | ||
: public ChromeMetricsServiceClient_ChromiumImpl { | ||
private: | ||
void RegisterMetricsServiceProviders() override; | ||
void RegisterUKMProviders() override; | ||
}; | ||
|
||
#endif // BRAVE_CHROMIUM_SRC_CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_CLIENT_H_ |
18 changes: 18 additions & 0 deletions
18
...-browser-performance_manager-chrome_browser_main_extra_parts_performance_manager.cc.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/chrome/browser/performance_manager/chrome_browser_main_extra_parts_performance_manager.cc b/chrome/browser/performance_manager/chrome_browser_main_extra_parts_performance_manager.cc | ||
index 11548a8313dc775cb9bea3bc041d896e42ce305a..bbdced4ba79bd5722b74b0639e1c2bcfa7b6f250 100644 | ||
--- a/chrome/browser/performance_manager/chrome_browser_main_extra_parts_performance_manager.cc | ||
+++ b/chrome/browser/performance_manager/chrome_browser_main_extra_parts_performance_manager.cc | ||
@@ -310,11 +310,13 @@ void ChromeBrowserMainExtraPartsPerformanceManager::PreMainMessageLoopRun() { | ||
performance_manager::user_tuning::UserPerformanceTuningManager::GetInstance() | ||
->Start(); | ||
|
||
+#if 0 // Disabled in Brave | ||
// This object is created by the metrics service before threads, but it | ||
// needs the UserPerformanceTuningManager to exist. At this point it's | ||
// instantiated, but still needs to be initialized. | ||
performance_manager::MetricsProviderDesktop::GetInstance()->Initialize(); | ||
#endif | ||
+#endif | ||
} | ||
|
||
void ChromeBrowserMainExtraPartsPerformanceManager::PostMainMessageLoopRun() { |