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

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: addressed review comments by Alexei 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
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 64abdec73ea340daebec78a76aa864baade67f34..48d4dbdd9f2d6f696c0201f5b3ac51955ecf5cc1 100644
--- a/base/metrics/persistent_histogram_allocator_unittest.cc
+++ b/base/metrics/persistent_histogram_allocator_unittest.cc
@@ -24,19 +24,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();
}
scoped_ptr<char[]> allocator_memory_;

Powered by Google App Engine
This is Rietveld 408576698