Chromium Code Reviews| Index: third_party/WebKit/Source/platform/Histogram.h |
| diff --git a/third_party/WebKit/Source/platform/Histogram.h b/third_party/WebKit/Source/platform/Histogram.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a782a28bfbeb63f34610c33a781afcfa91ca976e |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/platform/Histogram.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef Histogram_h |
| +#define Histogram_h |
| + |
| +#include "platform/PlatformExport.h" |
| +#include <stdint.h> |
| + |
| +namespace base { |
| +class HistogramBase; |
| +}; |
| + |
| +namespace blink { |
| + |
| +class PLATFORM_EXPORT CustomCountHistogram { |
|
bcwhite
2016/02/01 20:06:18
Why not have a HistogramBase equivalent rather tha
|
| +public: |
| + CustomCountHistogram(const char* name, int32_t min, int32_t max, int32_t bucketCount); |
| + void count(int32_t sample); |
| + |
| +protected: |
| + explicit CustomCountHistogram(base::HistogramBase*); |
| + |
| +private: |
| + base::HistogramBase* m_histogram; |
| +}; |
| + |
| +class PLATFORM_EXPORT EnumerationHistogram : public CustomCountHistogram { |
| +public: |
| + EnumerationHistogram(const char* name, int32_t boundaryValue); |
| +}; |
| + |
| +class PLATFORM_EXPORT SparseHistogram { |
| +public: |
| + explicit SparseHistogram(const char* name); |
| + |
| + void sample(int32_t sample); |
| + |
| +private: |
| + base::HistogramBase* m_histogram; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // Histogram_h |