Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef Histogram_h | |
| 6 #define Histogram_h | |
| 7 | |
| 8 #include "platform/PlatformExport.h" | |
| 9 #include <stdint.h> | |
| 10 | |
| 11 namespace base { | |
| 12 class HistogramBase; | |
| 13 }; | |
| 14 | |
| 15 namespace blink { | |
| 16 | |
| 17 class PLATFORM_EXPORT CustomCountHistogram { | |
| 18 public: | |
| 19 CustomCountHistogram(const char* name, int32_t min, int32_t max, int32_t buc ketCount); | |
| 20 void count(int32_t sample); | |
| 21 | |
| 22 protected: | |
| 23 CustomCountHistogram(base::HistogramBase*); | |
|
esprehn
2016/02/01 16:35:08
explicit, note that even private and protected met
dtapuska
2016/02/01 16:43:31
Done.
| |
| 24 | |
| 25 private: | |
| 26 base::HistogramBase* m_histogram; | |
| 27 }; | |
| 28 | |
| 29 class PLATFORM_EXPORT EnumerationHistogram : public CustomCountHistogram { | |
| 30 public: | |
| 31 EnumerationHistogram(const char* name, int32_t boundaryValue); | |
| 32 }; | |
| 33 | |
| 34 class PLATFORM_EXPORT SparseHistogram { | |
| 35 public: | |
| 36 explicit SparseHistogram(const char* name); | |
| 37 | |
| 38 void sample(int32_t sample); | |
| 39 | |
| 40 private: | |
| 41 base::HistogramBase* m_histogram; | |
| 42 }; | |
| 43 | |
| 44 } // namespace blink | |
| 45 | |
| 46 #endif // Histogram_h | |
| OLD | NEW |