| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ | 5 #ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ |
| 6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ | 6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 private: | 149 private: |
| 150 DISALLOW_COPY_AND_ASSIGN(ThroughputObserver); | 150 DISALLOW_COPY_AND_ASSIGN(ThroughputObserver); |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 // Provides simple interface to obtain the effective connection type. | 153 // Provides simple interface to obtain the effective connection type. |
| 154 class NET_EXPORT NetworkQualityProvider { | 154 class NET_EXPORT NetworkQualityProvider { |
| 155 public: | 155 public: |
| 156 // Returns the current effective connection type. | 156 // Returns the current effective connection type. |
| 157 virtual EffectiveConnectionType GetEffectiveConnectionType() const = 0; | 157 virtual EffectiveConnectionType GetEffectiveConnectionType() const = 0; |
| 158 | 158 |
| 159 // Adds |observer| to a list of effective connection type observers. |
| 160 virtual void AddEffectiveConnectionTypeObserver( |
| 161 EffectiveConnectionTypeObserver* observer) = 0; |
| 162 |
| 163 // Removes |observer| from a list of effective connection type observers. |
| 164 virtual void RemoveEffectiveConnectionTypeObserver( |
| 165 EffectiveConnectionTypeObserver* observer) = 0; |
| 166 |
| 159 virtual ~NetworkQualityProvider() {} | 167 virtual ~NetworkQualityProvider() {} |
| 160 | 168 |
| 161 protected: | 169 protected: |
| 162 NetworkQualityProvider() {} | 170 NetworkQualityProvider() {} |
| 163 | 171 |
| 164 private: | 172 private: |
| 165 DISALLOW_COPY_AND_ASSIGN(NetworkQualityProvider); | 173 DISALLOW_COPY_AND_ASSIGN(NetworkQualityProvider); |
| 166 }; | 174 }; |
| 167 | 175 |
| 168 // Creates a new NetworkQualityEstimator. | 176 // Creates a new NetworkQualityEstimator. |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 base::ThreadChecker thread_checker_; | 735 base::ThreadChecker thread_checker_; |
| 728 | 736 |
| 729 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; | 737 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; |
| 730 | 738 |
| 731 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); | 739 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); |
| 732 }; | 740 }; |
| 733 | 741 |
| 734 } // namespace net | 742 } // namespace net |
| 735 | 743 |
| 736 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ | 744 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ |
| OLD | NEW |