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 #include "net/nqe/network_quality_estimator_params.h" | 5 #include "net/nqe/network_quality_estimator_params.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 } // namespace | 366 } // namespace |
367 | 367 |
368 NetworkQualityEstimatorParams::NetworkQualityEstimatorParams( | 368 NetworkQualityEstimatorParams::NetworkQualityEstimatorParams( |
369 const std::map<std::string, std::string>& params) | 369 const std::map<std::string, std::string>& params) |
370 : params_(params), | 370 : params_(params), |
371 throughput_min_requests_in_flight_( | 371 throughput_min_requests_in_flight_( |
372 GetValueForVariationParam(params_, | 372 GetValueForVariationParam(params_, |
373 "throughput_min_requests_in_flight", | 373 "throughput_min_requests_in_flight", |
374 1)), | 374 1)), |
375 weight_multiplier_per_second_(GetWeightMultiplierPerSecond(params_)), | 375 weight_multiplier_per_second_(GetWeightMultiplierPerSecond(params_)), |
376 weight_multiplier_per_dbm_( | 376 weight_multiplier_per_signal_strength_level_( |
377 GetDoubleValueForVariationParamWithDefaultValue(params_, | 377 GetDoubleValueForVariationParamWithDefaultValue( |
378 "rssi_weight_per_dbm", | 378 params_, |
379 1.0)), | 379 "rssi_weight_per_signal_strength_level", |
| 380 1.0)), |
380 correlation_uma_logging_probability_( | 381 correlation_uma_logging_probability_( |
381 GetDoubleValueForVariationParamWithDefaultValue( | 382 GetDoubleValueForVariationParamWithDefaultValue( |
382 params_, | 383 params_, |
383 "correlation_logging_probability", | 384 "correlation_logging_probability", |
384 0.01)), | 385 0.01)), |
385 forced_effective_connection_type_( | 386 forced_effective_connection_type_( |
386 GetForcedEffectiveConnectionType(params_)), | 387 GetForcedEffectiveConnectionType(params_)), |
387 persistent_cache_reading_enabled_( | 388 persistent_cache_reading_enabled_( |
388 GetPersistentCacheReadingEnabled(params_)), | 389 GetPersistentCacheReadingEnabled(params_)), |
389 min_socket_watcher_notification_interval_( | 390 min_socket_watcher_notification_interval_( |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 EffectiveConnectionType type) const { | 433 EffectiveConnectionType type) const { |
433 DCHECK(thread_checker_.CalledOnValidThread()); | 434 DCHECK(thread_checker_.CalledOnValidThread()); |
434 return connection_thresholds_[type]; | 435 return connection_thresholds_[type]; |
435 } | 436 } |
436 | 437 |
437 } // namespace internal | 438 } // namespace internal |
438 | 439 |
439 } // namespace nqe | 440 } // namespace nqe |
440 | 441 |
441 } // namespace net | 442 } // namespace net |
OLD | NEW |