| 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_BASE_NETWORK_QUALITY_ESTIMATOR_H_ | 5 #ifndef NET_BASE_NETWORK_QUALITY_ESTIMATOR_H_ |
| 6 #define NET_BASE_NETWORK_QUALITY_ESTIMATOR_H_ | 6 #define NET_BASE_NETWORK_QUALITY_ESTIMATOR_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 | 567 |
| 568 // Determines if the requests to local host can be used in estimating the | 568 // Determines if the requests to local host can be used in estimating the |
| 569 // network quality. Set to true only for tests. | 569 // network quality. Set to true only for tests. |
| 570 const bool allow_localhost_requests_; | 570 const bool allow_localhost_requests_; |
| 571 | 571 |
| 572 // Determines if the responses smaller than |kMinTransferSizeInBytes| | 572 // Determines if the responses smaller than |kMinTransferSizeInBytes| |
| 573 // or shorter than |kMinTransferSizeInBytes| can be used in estimating the | 573 // or shorter than |kMinTransferSizeInBytes| can be used in estimating the |
| 574 // network quality. Set to true only for tests. | 574 // network quality. Set to true only for tests. |
| 575 const bool allow_small_responses_; | 575 const bool allow_small_responses_; |
| 576 | 576 |
| 577 // The factor by which the weight of an observation reduces every second. |
| 578 const double weight_multiplier_per_second_; |
| 579 |
| 577 // Time when last connection change was observed. | 580 // Time when last connection change was observed. |
| 578 base::TimeTicks last_connection_change_; | 581 base::TimeTicks last_connection_change_; |
| 579 | 582 |
| 580 // ID of the current network. | 583 // ID of the current network. |
| 581 NetworkID current_network_id_; | 584 NetworkID current_network_id_; |
| 582 | 585 |
| 583 // Peak network quality (fastest round-trip-time (RTT) and highest | 586 // Peak network quality (fastest round-trip-time (RTT) and highest |
| 584 // downstream throughput) measured since last connectivity change. RTT is | 587 // downstream throughput) measured since last connectivity change. RTT is |
| 585 // measured from time the request is sent until the first byte received. | 588 // measured from time the request is sent until the first byte received. |
| 586 // The accuracy is decreased by ignoring these factors: | 589 // The accuracy is decreased by ignoring these factors: |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 base::ThreadChecker thread_checker_; | 623 base::ThreadChecker thread_checker_; |
| 621 | 624 |
| 622 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; | 625 base::WeakPtrFactory<NetworkQualityEstimator> weak_ptr_factory_; |
| 623 | 626 |
| 624 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); | 627 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimator); |
| 625 }; | 628 }; |
| 626 | 629 |
| 627 } // namespace net | 630 } // namespace net |
| 628 | 631 |
| 629 #endif // NET_BASE_NETWORK_QUALITY_ESTIMATOR_H_ | 632 #endif // NET_BASE_NETWORK_QUALITY_ESTIMATOR_H_ |
| OLD | NEW |