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

Side by Side Diff: base/metrics/histogram_snapshot_manager_unittest.cc

Issue 804533005: Standardize usage of virtual/override/final specifiers in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify Created 6 years 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 unified diff | Download patch
« no previous file with comments | « base/metrics/histogram_base_unittest.cc ('k') | base/metrics/histogram_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/metrics/histogram_snapshot_manager.h" 5 #include "base/metrics/histogram_snapshot_manager.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 std::vector<std::string> recorded_delta_histogram_names_; 44 std::vector<std::string> recorded_delta_histogram_names_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(HistogramFlattenerDeltaRecorder); 46 DISALLOW_COPY_AND_ASSIGN(HistogramFlattenerDeltaRecorder);
47 }; 47 };
48 48
49 class HistogramSnapshotManagerTest : public testing::Test { 49 class HistogramSnapshotManagerTest : public testing::Test {
50 protected: 50 protected:
51 HistogramSnapshotManagerTest() 51 HistogramSnapshotManagerTest()
52 : histogram_snapshot_manager_(&histogram_flattener_delta_recorder_) {} 52 : histogram_snapshot_manager_(&histogram_flattener_delta_recorder_) {}
53 53
54 virtual ~HistogramSnapshotManagerTest() {} 54 ~HistogramSnapshotManagerTest() override {}
55 55
56 StatisticsRecorder statistics_recorder_; 56 StatisticsRecorder statistics_recorder_;
57 HistogramFlattenerDeltaRecorder histogram_flattener_delta_recorder_; 57 HistogramFlattenerDeltaRecorder histogram_flattener_delta_recorder_;
58 HistogramSnapshotManager histogram_snapshot_manager_; 58 HistogramSnapshotManager histogram_snapshot_manager_;
59 }; 59 };
60 60
61 TEST_F(HistogramSnapshotManagerTest, PrepareDeltasNoFlagsFilter) { 61 TEST_F(HistogramSnapshotManagerTest, PrepareDeltasNoFlagsFilter) {
62 // kNoFlags filter should record all histograms. 62 // kNoFlags filter should record all histograms.
63 UMA_HISTOGRAM_ENUMERATION("UmaHistogram", 1, 2); 63 UMA_HISTOGRAM_ENUMERATION("UmaHistogram", 1, 2);
64 UMA_STABILITY_HISTOGRAM_ENUMERATION("UmaStabilityHistogram", 1, 2); 64 UMA_STABILITY_HISTOGRAM_ENUMERATION("UmaStabilityHistogram", 1, 2);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 histogram_snapshot_manager_.PrepareDeltas( 96 histogram_snapshot_manager_.PrepareDeltas(
97 HistogramBase::kNoFlags, HistogramBase::kUmaStabilityHistogramFlag); 97 HistogramBase::kNoFlags, HistogramBase::kUmaStabilityHistogramFlag);
98 98
99 const std::vector<std::string>& histograms = 99 const std::vector<std::string>& histograms =
100 histogram_flattener_delta_recorder_.GetRecordedDeltaHistogramNames(); 100 histogram_flattener_delta_recorder_.GetRecordedDeltaHistogramNames();
101 EXPECT_EQ(1U, histograms.size()); 101 EXPECT_EQ(1U, histograms.size());
102 EXPECT_EQ("UmaStabilityHistogram", histograms[0]); 102 EXPECT_EQ("UmaStabilityHistogram", histograms[0]);
103 } 103 }
104 104
105 } // namespace base 105 } // namespace base
OLDNEW
« no previous file with comments | « base/metrics/histogram_base_unittest.cc ('k') | base/metrics/histogram_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698