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

Unified Diff: base/metrics/histogram.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
« no previous file with comments | « no previous file | base/metrics/histogram_unittest.cc » ('j') | base/metrics/persistent_histogram_allocator.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram.cc
diff --git a/base/metrics/histogram.cc b/base/metrics/histogram.cc
index 35197e26e395a9d08bd4bd9826938241e37754fe..2785e1b3ed2a883d1101690ebdc48b08941cf0f7 100644
--- a/base/metrics/histogram.cc
+++ b/base/metrics/histogram.cc
@@ -146,12 +146,6 @@ class Histogram::Factory {
};
HistogramBase* Histogram::Factory::Build() {
- // Import histograms from known persistent storage. Histograms could have
- // been added by other processes and they must be fetched and recognized
- // locally in order to be found by FindHistograms() below. If the persistent
- // memory segment is not shared between processes, this call does nothing.
- PersistentHistogramAllocator::ImportGlobalHistograms();
-
HistogramBase* histogram = StatisticsRecorder::FindHistogram(name_);
if (!histogram) {
// To avoid racy destruction at shutdown, the following will be leaked.
@@ -177,8 +171,7 @@ HistogramBase* Histogram::Factory::Build() {
// the process heap.
PersistentHistogramAllocator::Reference histogram_ref = 0;
scoped_ptr<HistogramBase> tentative_histogram;
- PersistentHistogramAllocator* allocator =
- PersistentHistogramAllocator::GetGlobalAllocator();
+ PersistentHistogramAllocator* allocator = GlobalHistogramAllocator::Get();
if (allocator) {
tentative_histogram = allocator->AllocateHistogram(
histogram_type_,
« no previous file with comments | « no previous file | base/metrics/histogram_unittest.cc » ('j') | base/metrics/persistent_histogram_allocator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698