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