Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3557)

Unified Diff: chrome/installer/setup/installer_metrics.cc

Issue 1780993002: Break global impact of PersistentHistogramAllocator into a separate class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor-hp
Patch Set: updated everything to use new Global class Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/installer/setup/installer_metrics.cc
diff --git a/chrome/installer/setup/installer_metrics.cc b/chrome/installer/setup/installer_metrics.cc
index ccc7ac413209db72a1143de2461de7bcc92bfd4e..9829ee5902eae97ec097ca3e0a648e35c3a07141 100644
--- a/chrome/installer/setup/installer_metrics.cc
+++ b/chrome/installer/setup/installer_metrics.cc
@@ -15,12 +15,12 @@
namespace installer {
void BeginPersistentHistogramStorage() {
- base::PersistentHistogramAllocator::CreateGlobalAllocatorOnLocalMemory(
+ base::GlobalHistogramAllocator::CreateWithLocalMemory(
1 << 20, // 1 MiB
0, // No identifier.
installer::kSetupHistogramAllocatorName);
- base::PersistentHistogramAllocator::GetGlobalAllocator()
- ->CreateTrackingHistograms(installer::kSetupHistogramAllocatorName);
+ base::GlobalHistogramAllocator::Get()->CreateTrackingHistograms(
+ installer::kSetupHistogramAllocatorName);
// This can't be enabled until after the allocator is configured because
// there is no other reporting out of setup other than persistent memory.
@@ -29,7 +29,7 @@ void BeginPersistentHistogramStorage() {
void EndPersistentHistogramStorage(const base::FilePath& target_path) {
base::PersistentHistogramAllocator* allocator =
- base::PersistentHistogramAllocator::GetGlobalAllocator();
+ base::GlobalHistogramAllocator::Get();
allocator->UpdateTrackingHistograms();
// For atomicity, first write to a temporary file and then rename it.

Powered by Google App Engine
This is Rietveld 408576698