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

Unified Diff: base/metrics/histogram_snapshot_manager_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 | « base/metrics/histogram_delta_serialization_unittest.cc ('k') | base/metrics/histogram_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram_snapshot_manager_unittest.cc
diff --git a/base/metrics/histogram_snapshot_manager_unittest.cc b/base/metrics/histogram_snapshot_manager_unittest.cc
index 8ec03daa8d97c9579f97dc949c18bfe59c02eb2f..6d53c86ac58319d83b74d7f7d6d53794da1f14ac 100644
--- a/base/metrics/histogram_snapshot_manager_unittest.cc
+++ b/base/metrics/histogram_snapshot_manager_unittest.cc
@@ -68,11 +68,12 @@ class HistogramFlattenerDeltaRecorder : public HistogramFlattener {
class HistogramSnapshotManagerTest : public testing::Test {
protected:
HistogramSnapshotManagerTest()
- : histogram_snapshot_manager_(&histogram_flattener_delta_recorder_) {}
+ : statistics_recorder_(StatisticsRecorder::CreateTemporaryForTesting()),
+ histogram_snapshot_manager_(&histogram_flattener_delta_recorder_) {}
~HistogramSnapshotManagerTest() override {}
- StatisticsRecorder statistics_recorder_;
+ std::unique_ptr<StatisticsRecorder> statistics_recorder_;
HistogramFlattenerDeltaRecorder histogram_flattener_delta_recorder_;
HistogramSnapshotManager histogram_snapshot_manager_;
};
« no previous file with comments | « base/metrics/histogram_delta_serialization_unittest.cc ('k') | base/metrics/histogram_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698