| 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/Histogram.h" | 5 #include "platform/Histogram.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
| 8 #include "base/metrics/sparse_histogram.h" | 8 #include "base/metrics/sparse_histogram.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 SparseHistogram::SparseHistogram(const char* name) { | 43 SparseHistogram::SparseHistogram(const char* name) { |
| 44 histogram_ = base::SparseHistogram::FactoryGet( | 44 histogram_ = base::SparseHistogram::FactoryGet( |
| 45 name, base::HistogramBase::kUmaTargetedHistogramFlag); | 45 name, base::HistogramBase::kUmaTargetedHistogramFlag); |
| 46 } | 46 } |
| 47 | 47 |
| 48 void SparseHistogram::Sample(base::HistogramBase::Sample sample) { | 48 void SparseHistogram::Sample(base::HistogramBase::Sample sample) { |
| 49 histogram_->Add(sample); | 49 histogram_->Add(sample); |
| 50 } | 50 } |
| 51 | 51 |
| 52 LinearHistogram::LinearHistogram(const char* name, |
| 53 base::HistogramBase::Sample min, |
| 54 base::HistogramBase::Sample max, |
| 55 int32_t bucket_count) |
| 56 : CustomCountHistogram(base::LinearHistogram::FactoryGet( |
| 57 name, |
| 58 min, |
| 59 max, |
| 60 bucket_count, |
| 61 base::HistogramBase::kUmaTargetedHistogramFlag)) {} |
| 62 |
| 52 } // namespace blink | 63 } // namespace blink |
| OLD | NEW |