Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Side by Side Diff: net/nqe/network_quality_estimator_params.h

Issue 2763853002: Use Android callback API to obtain cellular signal strength (Closed)
Patch Set: pauljensen comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return throughput_min_requests_in_flight_; 67 return throughput_min_requests_in_flight_;
68 } 68 }
69 69
70 // Returns the weight multiplier per second, which represents the factor by 70 // Returns the weight multiplier per second, which represents the factor by
71 // which the weight of an observation reduces every second. 71 // which the weight of an observation reduces every second.
72 double weight_multiplier_per_second() const { 72 double weight_multiplier_per_second() const {
73 return weight_multiplier_per_second_; 73 return weight_multiplier_per_second_;
74 } 74 }
75 75
76 // Returns the factor by which the weight of an observation reduces for every 76 // Returns the factor by which the weight of an observation reduces for every
77 // dBm difference between the current signal strength (in dBm), and the signal 77 // signal strength level difference between the current signal strength, and
78 // strength at the time when the observation was taken. 78 // the signal strength at the time when the observation was taken.
79 double weight_multiplier_per_dbm() const { 79 double weight_multiplier_per_signal_strength_level() const {
80 return weight_multiplier_per_dbm_; 80 return weight_multiplier_per_signal_strength_level_;
81 } 81 }
82 82
83 // Returns the fraction of URL requests that should record the correlation 83 // Returns the fraction of URL requests that should record the correlation
84 // UMA. 84 // UMA.
85 double correlation_uma_logging_probability() const { 85 double correlation_uma_logging_probability() const {
86 return correlation_uma_logging_probability_; 86 return correlation_uma_logging_probability_;
87 } 87 }
88 88
89 // Returns an unset value if the effective connection type has not been forced 89 // Returns an unset value if the effective connection type has not been forced
90 // via the |params| provided to this class. Otherwise, returns a value set to 90 // via the |params| provided to this class. Otherwise, returns a value set to
(...skipping 14 matching lines...) Expand all
105 return min_socket_watcher_notification_interval_; 105 return min_socket_watcher_notification_interval_;
106 } 106 }
107 107
108 private: 108 private:
109 // Map containing all field trial parameters related to 109 // Map containing all field trial parameters related to
110 // NetworkQualityEstimator field trial. 110 // NetworkQualityEstimator field trial.
111 const std::map<std::string, std::string> params_; 111 const std::map<std::string, std::string> params_;
112 112
113 const size_t throughput_min_requests_in_flight_; 113 const size_t throughput_min_requests_in_flight_;
114 const double weight_multiplier_per_second_; 114 const double weight_multiplier_per_second_;
115 const double weight_multiplier_per_dbm_; 115 const double weight_multiplier_per_signal_strength_level_;
116 const double correlation_uma_logging_probability_; 116 const double correlation_uma_logging_probability_;
117 const base::Optional<EffectiveConnectionType> 117 const base::Optional<EffectiveConnectionType>
118 forced_effective_connection_type_; 118 forced_effective_connection_type_;
119 const bool persistent_cache_reading_enabled_; 119 const bool persistent_cache_reading_enabled_;
120 const base::TimeDelta min_socket_watcher_notification_interval_; 120 const base::TimeDelta min_socket_watcher_notification_interval_;
121 121
122 // Default network quality observations obtained from |params_|. 122 // Default network quality observations obtained from |params_|.
123 NetworkQuality 123 NetworkQuality
124 default_observations_[NetworkChangeNotifier::CONNECTION_LAST + 1]; 124 default_observations_[NetworkChangeNotifier::CONNECTION_LAST + 1];
125 125
(...skipping 13 matching lines...) Expand all
139 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimatorParams); 139 DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimatorParams);
140 }; 140 };
141 141
142 } // namespace internal 142 } // namespace internal
143 143
144 } // namespace nqe 144 } // namespace nqe
145 145
146 } // namespace net 146 } // namespace net
147 147
148 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_PARAMS_H_ 148 #endif // NET_NQE_NETWORK_QUALITY_ESTIMATOR_PARAMS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698