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

Unified Diff: base/metrics/persistent_histogram_allocator_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/persistent_histogram_allocator.cc ('k') | base/metrics/sparse_histogram.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/persistent_histogram_allocator_unittest.cc
diff --git a/base/metrics/persistent_histogram_allocator_unittest.cc b/base/metrics/persistent_histogram_allocator_unittest.cc
index 922245faf523afd103774fae413dfc42075d8923..4f0d44689015c6f0d4df85a2512567fc7aed9354 100644
--- a/base/metrics/persistent_histogram_allocator_unittest.cc
+++ b/base/metrics/persistent_histogram_allocator_unittest.cc
@@ -25,19 +25,18 @@ class PersistentHistogramAllocatorTest : public testing::Test {
void CreatePersistentHistogramAllocator() {
allocator_memory_.reset(new char[kAllocatorMemorySize]);
- PersistentHistogramAllocator::ReleaseGlobalAllocatorForTesting();
+ GlobalHistogramAllocator::ReleaseForTesting();
memset(allocator_memory_.get(), 0, kAllocatorMemorySize);
- PersistentHistogramAllocator::GetCreateHistogramResultHistogram();
- PersistentHistogramAllocator::CreateGlobalAllocatorOnPersistentMemory(
+ GlobalHistogramAllocator::GetCreateHistogramResultHistogram();
+ GlobalHistogramAllocator::CreateWithPersistentMemory(
allocator_memory_.get(), kAllocatorMemorySize, 0, 0,
"PersistentHistogramAllocatorTest");
- allocator_ =
- PersistentHistogramAllocator::GetGlobalAllocator()->memory_allocator();
+ allocator_ = GlobalHistogramAllocator::Get()->memory_allocator();
}
void DestroyPersistentHistogramAllocator() {
allocator_ = nullptr;
- PersistentHistogramAllocator::ReleaseGlobalAllocatorForTesting();
+ GlobalHistogramAllocator::ReleaseForTesting();
}
std::unique_ptr<char[]> allocator_memory_;
« no previous file with comments | « base/metrics/persistent_histogram_allocator.cc ('k') | base/metrics/sparse_histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698