| 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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 // Larger size may affect performance. | 421 // Larger size may affect performance. |
| 422 static const size_t kMaximumNetworkQualityCacheSize = 10; | 422 static const size_t kMaximumNetworkQualityCacheSize = 10; |
| 423 | 423 |
| 424 // Returns the RTT value to be used when the valid RTT is unavailable. Readers | 424 // Returns the RTT value to be used when the valid RTT is unavailable. Readers |
| 425 // should discard RTT if it is set to the value returned by |InvalidRTT()|. | 425 // should discard RTT if it is set to the value returned by |InvalidRTT()|. |
| 426 static const base::TimeDelta InvalidRTT(); | 426 static const base::TimeDelta InvalidRTT(); |
| 427 | 427 |
| 428 // Records UMA when there is a change in connection type. | 428 // Records UMA when there is a change in connection type. |
| 429 void RecordMetricsOnConnectionTypeChanged() const; | 429 void RecordMetricsOnConnectionTypeChanged() const; |
| 430 | 430 |
| 431 // Records UMA on whether the NetworkID was available or not. Called right |
| 432 // after a network change event. |
| 433 void RecordNetworkIDAvailability() const; |
| 434 |
| 431 // Records UMA on main frame requests. | 435 // Records UMA on main frame requests. |
| 432 void RecordMetricsOnMainFrameRequest() const; | 436 void RecordMetricsOnMainFrameRequest() const; |
| 433 | 437 |
| 434 // Records a downstream throughput observation to the observation buffer if | 438 // Records a downstream throughput observation to the observation buffer if |
| 435 // a valid observation is available. |downstream_kbps| is the downstream | 439 // a valid observation is available. |downstream_kbps| is the downstream |
| 436 // throughput in kilobits per second. | 440 // throughput in kilobits per second. |
| 437 void OnNewThroughputObservationAvailable(int32_t downstream_kbps); | 441 void OnNewThroughputObservationAvailable(int32_t downstream_kbps); |
| 438 | 442 |
| 439 // Notifies |this| of a new transport layer RTT. | 443 // Notifies |this| of a new transport layer RTT. |
| 440 void OnUpdatedRTTAvailable(SocketPerformanceWatcherFactory::Protocol protocol, | 444 void OnUpdatedRTTAvailable(SocketPerformanceWatcherFactory::Protocol protocol, |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 base::ThreadChecker thread_checker_; | 649 base::ThreadChecker thread_checker_; |
| 646 | 650 |
| 647 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; | 651 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; |
| 648 | 652 |
| 649 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); | 653 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); |
| 650 }; | 654 }; |
| 651 | 655 |
| 652 } // namespace net | 656 } // namespace net |
| 653 | 657 |
| 654 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ | 658 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_H_ |
| OLD | NEW |