| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_METRICS_NET_NETWORK_METRICS_PROVIDER_H_ | 5 #ifndef COMPONENTS_METRICS_NET_NETWORK_METRICS_PROVIDER_H_ |
| 6 #define COMPONENTS_METRICS_NET_NETWORK_METRICS_PROVIDER_H_ | 6 #define COMPONENTS_METRICS_NET_NETWORK_METRICS_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // should be set if it is useful to attach the quality of the network to the | 57 // should be set if it is useful to attach the quality of the network to the |
| 58 // metrics report. | 58 // metrics report. |
| 59 NetworkMetricsProvider(std::unique_ptr<NetworkQualityEstimatorProvider> | 59 NetworkMetricsProvider(std::unique_ptr<NetworkQualityEstimatorProvider> |
| 60 network_quality_estimator_provider, | 60 network_quality_estimator_provider, |
| 61 base::TaskRunner* io_task_runner); | 61 base::TaskRunner* io_task_runner); |
| 62 | 62 |
| 63 ~NetworkMetricsProvider() override; | 63 ~NetworkMetricsProvider() override; |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 FRIEND_TEST_ALL_PREFIXES(NetworkMetricsProviderTest, EffectiveConnectionType); | 66 FRIEND_TEST_ALL_PREFIXES(NetworkMetricsProviderTest, EffectiveConnectionType); |
| 67 FRIEND_TEST_ALL_PREFIXES(NetworkMetricsProviderTest, |
| 68 ECTAmbiguousOnConnectionTypeChange); |
| 67 | 69 |
| 68 // Listens to the changes in the effective conection type. | 70 // Listens to the changes in the effective conection type. |
| 69 class EffectiveConnectionTypeObserver; | 71 class EffectiveConnectionTypeObserver; |
| 70 | 72 |
| 71 // MetricsProvider: | 73 // MetricsProvider: |
| 72 void ProvideGeneralMetrics(ChromeUserMetricsExtension* uma_proto) override; | 74 void ProvideGeneralMetrics(ChromeUserMetricsExtension* uma_proto) override; |
| 73 void ProvideSystemProfileMetrics(SystemProfileProto* system_profile) override; | 75 void ProvideSystemProfileMetrics(SystemProfileProto* system_profile) override; |
| 74 | 76 |
| 75 // ConnectionTypeObserver: | 77 // ConnectionTypeObserver: |
| 76 void OnConnectionTypeChanged( | 78 void OnConnectionTypeChanged( |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 base::ThreadChecker thread_checker_; | 148 base::ThreadChecker thread_checker_; |
| 147 | 149 |
| 148 base::WeakPtrFactory<NetworkMetricsProvider> weak_ptr_factory_; | 150 base::WeakPtrFactory<NetworkMetricsProvider> weak_ptr_factory_; |
| 149 | 151 |
| 150 DISALLOW_COPY_AND_ASSIGN(NetworkMetricsProvider); | 152 DISALLOW_COPY_AND_ASSIGN(NetworkMetricsProvider); |
| 151 }; | 153 }; |
| 152 | 154 |
| 153 } // namespace metrics | 155 } // namespace metrics |
| 154 | 156 |
| 155 #endif // COMPONENTS_METRICS_NET_NETWORK_METRICS_PROVIDER_H_ | 157 #endif // COMPONENTS_METRICS_NET_NETWORK_METRICS_PROVIDER_H_ |
| OLD | NEW |