| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 72     return throughput_min_requests_in_flight_; | 72     return throughput_min_requests_in_flight_; | 
| 73   } | 73   } | 
| 74 | 74 | 
| 75   // Returns the weight multiplier per second, which represents the factor by | 75   // Returns the weight multiplier per second, which represents the factor by | 
| 76   // which the weight of an observation reduces every second. | 76   // which the weight of an observation reduces every second. | 
| 77   double weight_multiplier_per_second() const { | 77   double weight_multiplier_per_second() const { | 
| 78     return weight_multiplier_per_second_; | 78     return weight_multiplier_per_second_; | 
| 79   } | 79   } | 
| 80 | 80 | 
| 81   // Returns the factor by which the weight of an observation reduces for every | 81   // Returns the factor by which the weight of an observation reduces for every | 
| 82   // dBm difference between the current signal strength (in dBm), and the signal | 82   // signal strength level difference between the current signal strength, and | 
| 83   // strength at the time when the observation was taken. | 83   // the signal strength at the time when the observation was taken. | 
| 84   double weight_multiplier_per_dbm() const { | 84   double weight_multiplier_per_signal_strength_level() const { | 
| 85     return weight_multiplier_per_dbm_; | 85     return weight_multiplier_per_signal_strength_level_; | 
| 86   } | 86   } | 
| 87 | 87 | 
| 88   // Returns the fraction of URL requests that should record the correlation | 88   // Returns the fraction of URL requests that should record the correlation | 
| 89   // UMA. | 89   // UMA. | 
| 90   double correlation_uma_logging_probability() const { | 90   double correlation_uma_logging_probability() const { | 
| 91     return correlation_uma_logging_probability_; | 91     return correlation_uma_logging_probability_; | 
| 92   } | 92   } | 
| 93 | 93 | 
| 94   // Returns an unset value if the effective connection type has not been forced | 94   // Returns an unset value if the effective connection type has not been forced | 
| 95   // via the |params| provided to this class. Otherwise, returns a value set to | 95   // via the |params| provided to this class. Otherwise, returns a value set to | 
| (...skipping 21 matching lines...) Expand all  Loading... | 
| 117   GetEffectiveConnectionTypeAlgorithmFromString( | 117   GetEffectiveConnectionTypeAlgorithmFromString( | 
| 118       const std::string& algorithm_param_value); | 118       const std::string& algorithm_param_value); | 
| 119 | 119 | 
| 120  private: | 120  private: | 
| 121   // Map containing all field trial parameters related to | 121   // Map containing all field trial parameters related to | 
| 122   // NetworkQualityEstimator field trial. | 122   // NetworkQualityEstimator field trial. | 
| 123   const std::map<std::string, std::string> params_; | 123   const std::map<std::string, std::string> params_; | 
| 124 | 124 | 
| 125   const size_t throughput_min_requests_in_flight_; | 125   const size_t throughput_min_requests_in_flight_; | 
| 126   const double weight_multiplier_per_second_; | 126   const double weight_multiplier_per_second_; | 
| 127   const double weight_multiplier_per_dbm_; | 127   const double weight_multiplier_per_signal_strength_level_; | 
| 128   const double correlation_uma_logging_probability_; | 128   const double correlation_uma_logging_probability_; | 
| 129   const base::Optional<EffectiveConnectionType> | 129   const base::Optional<EffectiveConnectionType> | 
| 130       forced_effective_connection_type_; | 130       forced_effective_connection_type_; | 
| 131   const bool persistent_cache_reading_enabled_; | 131   const bool persistent_cache_reading_enabled_; | 
| 132   const base::TimeDelta min_socket_watcher_notification_interval_; | 132   const base::TimeDelta min_socket_watcher_notification_interval_; | 
| 133 | 133 | 
| 134   EffectiveConnectionTypeAlgorithm effective_connection_type_algorithm_; | 134   EffectiveConnectionTypeAlgorithm effective_connection_type_algorithm_; | 
| 135 | 135 | 
| 136   // Default network quality observations obtained from |params_|. | 136   // Default network quality observations obtained from |params_|. | 
| 137   nqe::internal::NetworkQuality | 137   nqe::internal::NetworkQuality | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
| 149       [EffectiveConnectionType::EFFECTIVE_CONNECTION_TYPE_LAST]; | 149       [EffectiveConnectionType::EFFECTIVE_CONNECTION_TYPE_LAST]; | 
| 150 | 150 | 
| 151   base::ThreadChecker thread_checker_; | 151   base::ThreadChecker thread_checker_; | 
| 152 | 152 | 
| 153   DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimatorParams); | 153   DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimatorParams); | 
| 154 }; | 154 }; | 
| 155 | 155 | 
| 156 }  // namespace net | 156 }  // namespace net | 
| 157 | 157 | 
| 158 #endif  // NET_NQE_NETWORK_QUALITY_ESTIMATOR_PARAMS_H_ | 158 #endif  // NET_NQE_NETWORK_QUALITY_ESTIMATOR_PARAMS_H_ | 
| OLD | NEW | 
|---|