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

Unified Diff: base/metrics/sparse_histogram_unittest.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: fixed bad formatting from upstream scoped_ptr change Created 4 years, 8 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 | « base/metrics/sparse_histogram.cc ('k') | base/metrics/statistics_recorder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/sparse_histogram_unittest.cc
diff --git a/base/metrics/sparse_histogram_unittest.cc b/base/metrics/sparse_histogram_unittest.cc
index 6cddd1fdb16d635c617482f94bdb6c693dfea6b7..42c116786df2a375bc6719b5b0feb395edf51431 100644
--- a/base/metrics/sparse_histogram_unittest.cc
+++ b/base/metrics/sparse_histogram_unittest.cc
@@ -60,17 +60,16 @@ class SparseHistogramTest : public testing::TestWithParam<bool> {
// By getting the results-histogram before any persistent allocator
// is attached, that histogram is guaranteed not to be stored in
// any persistent memory segment (which simplifies some tests).
- PersistentHistogramAllocator::GetCreateHistogramResultHistogram();
+ GlobalHistogramAllocator::GetCreateHistogramResultHistogram();
- PersistentHistogramAllocator::CreateGlobalAllocatorOnLocalMemory(
+ GlobalHistogramAllocator::CreateWithLocalMemory(
kAllocatorMemorySize, 0, "SparseHistogramAllocatorTest");
- allocator_ =
- PersistentHistogramAllocator::GetGlobalAllocator()->memory_allocator();
+ allocator_ = GlobalHistogramAllocator::Get()->memory_allocator();
}
void DestroyPersistentMemoryAllocator() {
allocator_ = nullptr;
- PersistentHistogramAllocator::ReleaseGlobalAllocatorForTesting();
+ GlobalHistogramAllocator::ReleaseForTesting();
}
std::unique_ptr<SparseHistogram> NewSparseHistogram(const std::string& name) {
@@ -80,7 +79,6 @@ class SparseHistogramTest : public testing::TestWithParam<bool> {
const bool use_persistent_histogram_allocator_;
StatisticsRecorder* statistics_recorder_;
- std::unique_ptr<char[]> allocator_memory_;
PersistentMemoryAllocator* allocator_ = nullptr;
private:
« no previous file with comments | « base/metrics/sparse_histogram.cc ('k') | base/metrics/statistics_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698