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

Unified Diff: base/metrics/histogram_base_unittest.cc

Issue 2036643004: Create ForTesting method rather than declaring a dozen "friend" classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 6 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_delta_serialization_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram_base_unittest.cc
diff --git a/base/metrics/histogram_base_unittest.cc b/base/metrics/histogram_base_unittest.cc
index 5ce39cabe1f602fa6f01a2e94ac8493f3b44f138..1eb8fd46084ba2c82d396db9f810042b90376f5d 100644
--- a/base/metrics/histogram_base_unittest.cc
+++ b/base/metrics/histogram_base_unittest.cc
@@ -29,7 +29,7 @@ class HistogramBaseTest : public testing::Test {
// It is necessary to fully destruct any existing StatisticsRecorder
// before creating a new one.
statistics_recorder_.reset();
- statistics_recorder_.reset(new StatisticsRecorder());
+ statistics_recorder_ = StatisticsRecorder::CreateTemporaryForTesting();
}
HistogramBase* GetCreationReportHistogram(const std::string& name) {
« no previous file with comments | « no previous file | base/metrics/histogram_delta_serialization_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698