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

Side by Side Diff: base/metrics/stats_counters.h

Issue 614103004: replace 'virtual ... OVERRIDE' with '... override' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: process 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef BASE_METRICS_STATS_COUNTERS_H_ 5 #ifndef BASE_METRICS_STATS_COUNTERS_H_
6 #define BASE_METRICS_STATS_COUNTERS_H_ 6 #define BASE_METRICS_STATS_COUNTERS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 // A StatsRate is a timer that keeps a count of the number of intervals added so 158 // A StatsRate is a timer that keeps a count of the number of intervals added so
159 // that several statistics can be produced: 159 // that several statistics can be produced:
160 // min, max, avg, count, total 160 // min, max, avg, count, total
161 class BASE_EXPORT StatsRate : public StatsCounterTimer { 161 class BASE_EXPORT StatsRate : public StatsCounterTimer {
162 public: 162 public:
163 // Constructs and starts the timer. 163 // Constructs and starts the timer.
164 explicit StatsRate(const std::string& name); 164 explicit StatsRate(const std::string& name);
165 virtual ~StatsRate(); 165 virtual ~StatsRate();
166 166
167 virtual void Add(int value) OVERRIDE; 167 void Add(int value) override;
168 168
169 private: 169 private:
170 StatsCounter counter_; 170 StatsCounter counter_;
171 StatsCounter largest_add_; 171 StatsCounter largest_add_;
172 }; 172 };
173 173
174 174
175 // Helper class for scoping a timer or rate. 175 // Helper class for scoping a timer or rate.
176 template<class T> class StatsScope { 176 template<class T> class StatsScope {
177 public: 177 public:
(...skipping 10 matching lines...) Expand all
188 timer_.Stop(); 188 timer_.Stop();
189 } 189 }
190 190
191 private: 191 private:
192 T& timer_; 192 T& timer_;
193 }; 193 };
194 194
195 } // namespace base 195 } // namespace base
196 196
197 #endif // BASE_METRICS_STATS_COUNTERS_H_ 197 #endif // BASE_METRICS_STATS_COUNTERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698