Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_PARAMS_H_ | 5 #ifndef NET_NQE_NETWORK_QUALITY_ESTIMATOR_PARAMS_H_ |
| 6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_PARAMS_H_ | 6 #define NET_NQE_NETWORK_QUALITY_ESTIMATOR_PARAMS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 const NetworkQuality& DefaultObservation( | 53 const NetworkQuality& DefaultObservation( |
| 54 NetworkChangeNotifier::ConnectionType type) const; | 54 NetworkChangeNotifier::ConnectionType type) const; |
| 55 | 55 |
| 56 // Returns the typical network quality for connection |type|. | 56 // Returns the typical network quality for connection |type|. |
| 57 const NetworkQuality& TypicalNetworkQuality( | 57 const NetworkQuality& TypicalNetworkQuality( |
| 58 EffectiveConnectionType type) const; | 58 EffectiveConnectionType type) const; |
| 59 | 59 |
| 60 // Returns the threshold for effective connection type |type|. | 60 // Returns the threshold for effective connection type |type|. |
| 61 const NetworkQuality& ConnectionThreshold(EffectiveConnectionType type) const; | 61 const NetworkQuality& ConnectionThreshold(EffectiveConnectionType type) const; |
| 62 | 62 |
| 63 // Returns the minimum number of requests in-flight before the throughput | |
|
RyanSturm
2017/05/22 20:14:40
nit: I don't like this phrasing. I'm struggling to
tbansal1
2017/05/22 22:51:55
Done.
| |
| 64 // observation can be taken. | |
| 65 size_t throughput_min_requests_in_flight() const { | |
| 66 return throughput_min_requests_in_flight_; | |
| 67 } | |
| 68 | |
| 63 // Returns the weight multiplier per second, which represents the factor by | 69 // Returns the weight multiplier per second, which represents the factor by |
| 64 // which the weight of an observation reduces every second. | 70 // which the weight of an observation reduces every second. |
| 65 double weight_multiplier_per_second() const { | 71 double weight_multiplier_per_second() const { |
| 66 return weight_multiplier_per_second_; | 72 return weight_multiplier_per_second_; |
| 67 } | 73 } |
| 68 | 74 |
| 69 // Returns the factor by which the weight of an observation reduces for every | 75 // Returns the factor by which the weight of an observation reduces for every |
| 70 // dBm difference between the current signal strength (in dBm), and the signal | 76 // dBm difference between the current signal strength (in dBm), and the signal |
| 71 // strength at the time when the observation was taken. | 77 // strength at the time when the observation was taken. |
| 72 double weight_multiplier_per_dbm() const { | 78 double weight_multiplier_per_dbm() const { |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 96 // single socket watcher. | 102 // single socket watcher. |
| 97 base::TimeDelta min_socket_watcher_notification_interval() const { | 103 base::TimeDelta min_socket_watcher_notification_interval() const { |
| 98 return min_socket_watcher_notification_interval_; | 104 return min_socket_watcher_notification_interval_; |
| 99 } | 105 } |
| 100 | 106 |
| 101 private: | 107 private: |
| 102 // Map containing all field trial parameters related to | 108 // Map containing all field trial parameters related to |
| 103 // NetworkQualityEstimator field trial. | 109 // NetworkQualityEstimator field trial. |
| 104 const std::map<std::string, std::string> params_; | 110 const std::map<std::string, std::string> params_; |
| 105 | 111 |
| 112 const size_t throughput_min_requests_in_flight_; | |
| 106 const double weight_multiplier_per_second_; | 113 const double weight_multiplier_per_second_; |
| 107 const double weight_multiplier_per_dbm_; | 114 const double weight_multiplier_per_dbm_; |
| 108 const double correlation_uma_logging_probability_; | 115 const double correlation_uma_logging_probability_; |
| 109 const base::Optional<EffectiveConnectionType> | 116 const base::Optional<EffectiveConnectionType> |
| 110 forced_effective_connection_type_; | 117 forced_effective_connection_type_; |
| 111 const bool persistent_cache_reading_enabled_; | 118 const bool persistent_cache_reading_enabled_; |
| 112 const base::TimeDelta min_socket_watcher_notification_interval_; | 119 const base::TimeDelta min_socket_watcher_notification_interval_; |
| 113 | 120 |
| 114 // Default network quality observations obtained from |params_|. | 121 // Default network quality observations obtained from |params_|. |
| 115 NetworkQuality | 122 NetworkQuality |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 131 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimatorParams); | 138 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimatorParams); |
| 132 }; | 139 }; |
| 133 | 140 |
| 134 } // namespace internal | 141 } // namespace internal |
| 135 | 142 |
| 136 } // namespace nqe | 143 } // namespace nqe |
| 137 | 144 |
| 138 } // namespace net | 145 } // namespace net |
| 139 | 146 |
| 140 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_PARAMS_H_ | 147 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_PARAMS_H_ |
| OLD | NEW |