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 CHROME_BROWSER_METRICS_NETWORK_QUALITY_ESTIMATOR_PROVIDER_IMPL_H_ |
| 6 #define CHROME_BROWSER_METRICS_NETWORK_QUALITY_ESTIMATOR_PROVIDER_IMPL_H_ |
| 7 |
| 8 #include "base/callback.h" |
| 9 #include "base/macros.h" |
| 10 #include "base/threading/thread_checker.h" |
| 11 #include "components/metrics/net/network_metrics_provider.h" |
| 12 |
| 13 class IOThread; |
| 14 |
| 15 namespace metrics { |
| 16 |
| 17 // Implements NetworkMetricsProvider::NetworkQualityEstimatorProvider. Provides |
| 18 // NetworkQualityEstimator by querying the IOThread. |
| 19 class NetworkQualityEstimatorProviderImpl |
| 20 : public NetworkMetricsProvider::NetworkQualityEstimatorProvider { |
| 21 public: |
| 22 explicit NetworkQualityEstimatorProviderImpl(IOThread* io_thread); |
| 23 ~NetworkQualityEstimatorProviderImpl() override; |
| 24 |
| 25 private: |
| 26 // NetworkMetricsProvider::NetworkQualityEstimatorProvider implementation: |
| 27 void ProvideEstimator( |
| 28 const base::Callback<void(net::NetworkQualityEstimator*)>& callback) |
| 29 override; |
| 30 |
| 31 IOThread* io_thread_; |
| 32 |
| 33 base::ThreadChecker thread_checker_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimatorProviderImpl); |
| 36 }; |
| 37 |
| 38 } // namespace metrics |
| 39 |
| 40 #endif // CHROME_BROWSER_METRICS_NETWORK_QUALITY_ESTIMATOR_PROVIDER_IMPL_H_ |
OLD | NEW |