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

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

Issue 611153004: replace OVERRIDE and FINAL with override and final in base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CC_ -> BASE_ Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « base/metrics/histogram_samples.cc ('k') | base/metrics/sample_map.h » ('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"
11 #include "base/metrics/histogram_delta_serialization.h" 11 #include "base/metrics/histogram_delta_serialization.h"
12 #include "base/metrics/statistics_recorder.h" 12 #include "base/metrics/statistics_recorder.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace base { 15 namespace base {
16 16
17 class HistogramFlattenerDeltaRecorder : public HistogramFlattener { 17 class HistogramFlattenerDeltaRecorder : public HistogramFlattener {
18 public: 18 public:
19 HistogramFlattenerDeltaRecorder() {} 19 HistogramFlattenerDeltaRecorder() {}
20 20
21 virtual void RecordDelta(const HistogramBase& histogram, 21 virtual void RecordDelta(const HistogramBase& histogram,
22 const HistogramSamples& snapshot) OVERRIDE { 22 const HistogramSamples& snapshot) override {
23 recorded_delta_histogram_names_.push_back(histogram.histogram_name()); 23 recorded_delta_histogram_names_.push_back(histogram.histogram_name());
24 } 24 }
25 25
26 virtual void InconsistencyDetected( 26 virtual void InconsistencyDetected(
27 HistogramBase::Inconsistency problem) OVERRIDE { 27 HistogramBase::Inconsistency problem) override {
28 ASSERT_TRUE(false); 28 ASSERT_TRUE(false);
29 } 29 }
30 30
31 virtual void UniqueInconsistencyDetected( 31 virtual void UniqueInconsistencyDetected(
32 HistogramBase::Inconsistency problem) OVERRIDE { 32 HistogramBase::Inconsistency problem) override {
33 ASSERT_TRUE(false); 33 ASSERT_TRUE(false);
34 } 34 }
35 35
36 virtual void InconsistencyDetectedInLoggedCount(int amount) OVERRIDE { 36 virtual void InconsistencyDetectedInLoggedCount(int amount) override {
37 ASSERT_TRUE(false); 37 ASSERT_TRUE(false);
38 } 38 }
39 39
40 std::vector<std::string> GetRecordedDeltaHistogramNames() { 40 std::vector<std::string> GetRecordedDeltaHistogramNames() {
41 return recorded_delta_histogram_names_; 41 return recorded_delta_histogram_names_;
42 } 42 }
43 43
44 private: 44 private:
45 std::vector<std::string> recorded_delta_histogram_names_; 45 std::vector<std::string> recorded_delta_histogram_names_;
46 46
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 histogram_snapshot_manager_.PrepareDeltas( 97 histogram_snapshot_manager_.PrepareDeltas(
98 HistogramBase::kNoFlags, HistogramBase::kUmaStabilityHistogramFlag); 98 HistogramBase::kNoFlags, HistogramBase::kUmaStabilityHistogramFlag);
99 99
100 const std::vector<std::string>& histograms = 100 const std::vector<std::string>& histograms =
101 histogram_flattener_delta_recorder_.GetRecordedDeltaHistogramNames(); 101 histogram_flattener_delta_recorder_.GetRecordedDeltaHistogramNames();
102 EXPECT_EQ(1U, histograms.size()); 102 EXPECT_EQ(1U, histograms.size());
103 EXPECT_EQ("UmaStabilityHistogram", histograms[0]); 103 EXPECT_EQ("UmaStabilityHistogram", histograms[0]);
104 } 104 }
105 105
106 } // namespace base 106 } // namespace base
OLDNEW
« no previous file with comments | « base/metrics/histogram_samples.cc ('k') | base/metrics/sample_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698