OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 COMPONENTS_METRICS_SINGLE_SAMPLE_METRICS_PROVIDER_H_ |
| 6 #define COMPONENTS_METRICS_SINGLE_SAMPLE_METRICS_PROVIDER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/metrics/histogram_base.h" |
| 10 #include "base/threading/thread_checker.h" |
| 11 #include "components/metrics/public/interfaces/single_sample_metrics.mojom.h" |
| 12 |
| 13 namespace metrics { |
| 14 |
| 15 class SingleSampleMetricsProvider : public mojom::SingleSampleMetricsProvider { |
| 16 public: |
| 17 static void Create(mojom::SingleSampleMetricsProviderRequest request); |
| 18 |
| 19 SingleSampleMetricsProvider(); |
| 20 ~SingleSampleMetricsProvider() override; |
| 21 |
| 22 private: |
| 23 void AcquireSingleSampleMetric( |
| 24 const std::string& name, |
| 25 base::HistogramBase::Sample min, |
| 26 base::HistogramBase::Sample max, |
| 27 uint32_t bucket_count, |
| 28 int32_t flags, |
| 29 mojom::SingleSampleMetricRequest request) override; |
| 30 |
| 31 // Providers must be created, used on, and destroyed on the same thread. |
| 32 base::ThreadChecker thread_checker_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(SingleSampleMetricsProvider); |
| 35 }; |
| 36 |
| 37 } // namespace metrics |
| 38 |
| 39 #endif // COMPONENTS_METRICS_SINGLE_SAMPLE_METRICS_PROVIDER_H_ |
OLD | NEW |