OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 HistogramTester_h | 5 #ifndef HistogramTester_h |
6 #define HistogramTester_h | 6 #define HistogramTester_h |
7 | 7 |
| 8 #include <memory> |
8 #include "platform/Histogram.h" | 9 #include "platform/Histogram.h" |
9 #include <memory> | |
10 | 10 |
11 namespace base { | 11 namespace base { |
12 class HistogramTester; | 12 class HistogramTester; |
13 } | 13 } |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 // Blink interface for base::HistogramTester. | 17 // Blink interface for base::HistogramTester. |
18 class HistogramTester { | 18 class HistogramTester { |
19 public: | 19 public: |
20 HistogramTester(); | 20 HistogramTester(); |
21 ~HistogramTester(); | 21 ~HistogramTester(); |
22 | 22 |
23 void expectUniqueSample(const std::string& name, | 23 void expectUniqueSample(const std::string& name, |
24 base::HistogramBase::Sample, | 24 base::HistogramBase::Sample, |
25 base::HistogramBase::Count) const; | 25 base::HistogramBase::Count) const; |
26 void expectBucketCount(const std::string& name, | 26 void expectBucketCount(const std::string& name, |
27 base::HistogramBase::Sample, | 27 base::HistogramBase::Sample, |
28 base::HistogramBase::Count) const; | 28 base::HistogramBase::Count) const; |
29 void expectTotalCount(const std::string& name, | 29 void expectTotalCount(const std::string& name, |
30 base::HistogramBase::Count) const; | 30 base::HistogramBase::Count) const; |
31 | 31 |
32 private: | 32 private: |
33 std::unique_ptr<base::HistogramTester> m_histogramTester; | 33 std::unique_ptr<base::HistogramTester> m_histogramTester; |
34 }; | 34 }; |
35 | 35 |
36 } // namespace blink | 36 } // namespace blink |
37 | 37 |
38 #endif // HistogramTester_h | 38 #endif // HistogramTester_h |
OLD | NEW |