| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 static const int kExternalEstimateProviderFreshnessDurationMsec = | 320 static const int kExternalEstimateProviderFreshnessDurationMsec = |
| 321 5 * 60 * 1000; | 321 5 * 60 * 1000; |
| 322 | 322 |
| 323 // Returns the RTT value to be used when the valid RTT is unavailable. Readers | 323 // Returns the RTT value to be used when the valid RTT is unavailable. Readers |
| 324 // should discard RTT if it is set to the value returned by |InvalidRTT()|. | 324 // should discard RTT if it is set to the value returned by |InvalidRTT()|. |
| 325 static const base::TimeDelta InvalidRTT(); | 325 static const base::TimeDelta InvalidRTT(); |
| 326 | 326 |
| 327 // Records UMA when there is a change in connection type. | 327 // Records UMA when there is a change in connection type. |
| 328 void RecordMetricsOnConnectionTypeChanged() const; | 328 void RecordMetricsOnConnectionTypeChanged() const; |
| 329 | 329 |
| 330 // Records UMA on main frame requests. |
| 331 void RecordMetricsOnMainFrameRequest() const; |
| 332 |
| 330 // Records a downstream throughput observation to the observation buffer if | 333 // Records a downstream throughput observation to the observation buffer if |
| 331 // a valid observation is available. |downstream_kbps| is the downstream | 334 // a valid observation is available. |downstream_kbps| is the downstream |
| 332 // throughput in kilobits per second. | 335 // throughput in kilobits per second. |
| 333 void OnNewThroughputObservationAvailable(int32_t downstream_kbps); | 336 void OnNewThroughputObservationAvailable(int32_t downstream_kbps); |
| 334 | 337 |
| 335 // Notifies |this| of a new transport layer RTT. | 338 // Notifies |this| of a new transport layer RTT. |
| 336 void OnUpdatedRTTAvailable(SocketPerformanceWatcherFactory::Protocol protocol, | 339 void OnUpdatedRTTAvailable(SocketPerformanceWatcherFactory::Protocol protocol, |
| 337 const base::TimeDelta& rtt); | 340 const base::TimeDelta& rtt); |
| 338 | 341 |
| 339 // Queries the external estimate provider for the latest network quality | 342 // Queries the external estimate provider for the latest network quality |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 base::ThreadChecker thread_checker_; | 488 base::ThreadChecker thread_checker_; |
| 486 | 489 |
| 487 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; | 490 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; |
| 488 | 491 |
| 489 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); | 492 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); |
| 490 }; | 493 }; |
| 491 | 494 |
| 492 } // namespace net | 495 } // namespace net |
| 493 | 496 |
| 494 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ | 497 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ |
| OLD | NEW |