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 #include "platform/testing/HistogramTester.h" | 5 #include "platform/testing/HistogramTester.h" |
6 | 6 |
7 #include "base/test/histogram_tester.h" | 7 #include "base/test/histogram_tester.h" |
8 #include "wtf/PtrUtil.h" | 8 #include "wtf/PtrUtil.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
11 | 11 |
12 HistogramTester::HistogramTester() | 12 HistogramTester::HistogramTester() |
13 : m_histogramTester(wrapUnique(new base::HistogramTester)) {} | 13 : m_histogramTester(WTF::wrapUnique(new base::HistogramTester)) {} |
14 | 14 |
15 HistogramTester::~HistogramTester() {} | 15 HistogramTester::~HistogramTester() {} |
16 | 16 |
17 void HistogramTester::expectUniqueSample( | 17 void HistogramTester::expectUniqueSample( |
18 const std::string& name, | 18 const std::string& name, |
19 base::HistogramBase::Sample sample, | 19 base::HistogramBase::Sample sample, |
20 base::HistogramBase::Count count) const { | 20 base::HistogramBase::Count count) const { |
21 m_histogramTester->ExpectUniqueSample(name, sample, count); | 21 m_histogramTester->ExpectUniqueSample(name, sample, count); |
22 } | 22 } |
23 | 23 |
24 void HistogramTester::expectBucketCount( | 24 void HistogramTester::expectBucketCount( |
25 const std::string& name, | 25 const std::string& name, |
26 base::HistogramBase::Sample sample, | 26 base::HistogramBase::Sample sample, |
27 base::HistogramBase::Count count) const { | 27 base::HistogramBase::Count count) const { |
28 m_histogramTester->ExpectBucketCount(name, sample, count); | 28 m_histogramTester->ExpectBucketCount(name, sample, count); |
29 } | 29 } |
30 | 30 |
31 void HistogramTester::expectTotalCount(const std::string& name, | 31 void HistogramTester::expectTotalCount(const std::string& name, |
32 base::HistogramBase::Count count) const { | 32 base::HistogramBase::Count count) const { |
33 m_histogramTester->ExpectTotalCount(name, count); | 33 m_histogramTester->ExpectTotalCount(name, count); |
34 } | 34 } |
35 | 35 |
36 } // namespace blink | 36 } // namespace blink |
OLD | NEW |