| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 .downstream_throughput_kbps())); | 323 .downstream_throughput_kbps())); |
| 324 DCHECK(i == 0 || | 324 DCHECK(i == 0 || |
| 325 connection_thresholds[i].IsFaster(connection_thresholds[i - 1])); | 325 connection_thresholds[i].IsFaster(connection_thresholds[i - 1])); |
| 326 } | 326 } |
| 327 } | 327 } |
| 328 | 328 |
| 329 double correlation_uma_logging_probability( | 329 double correlation_uma_logging_probability( |
| 330 const std::map<std::string, std::string>& variation_params) { | 330 const std::map<std::string, std::string>& variation_params) { |
| 331 double correlation_uma_logging_probability = | 331 double correlation_uma_logging_probability = |
| 332 GetDoubleValueForVariationParamWithDefaultValue( | 332 GetDoubleValueForVariationParamWithDefaultValue( |
| 333 variation_params, "correlation_logging_probability", 0.0); | 333 variation_params, "correlation_logging_probability", 0.01); |
| 334 DCHECK_LE(0.0, correlation_uma_logging_probability); | 334 DCHECK_LE(0.0, correlation_uma_logging_probability); |
| 335 DCHECK_GE(1.0, correlation_uma_logging_probability); | 335 DCHECK_GE(1.0, correlation_uma_logging_probability); |
| 336 return correlation_uma_logging_probability; | 336 return correlation_uma_logging_probability; |
| 337 } | 337 } |
| 338 | 338 |
| 339 bool forced_effective_connection_type_set( | 339 bool forced_effective_connection_type_set( |
| 340 const std::map<std::string, std::string>& variation_params) { | 340 const std::map<std::string, std::string>& variation_params) { |
| 341 return !GetStringValueForVariationParamWithDefaultValue( | 341 return !GetStringValueForVariationParamWithDefaultValue( |
| 342 variation_params, "force_effective_connection_type", "") | 342 variation_params, "force_effective_connection_type", "") |
| 343 .empty(); | 343 .empty(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 359 (void)effective_connection_type_available; | 359 (void)effective_connection_type_available; |
| 360 | 360 |
| 361 return forced_effective_connection_type; | 361 return forced_effective_connection_type; |
| 362 } | 362 } |
| 363 | 363 |
| 364 } // namespace internal | 364 } // namespace internal |
| 365 | 365 |
| 366 } // namespace nqe | 366 } // namespace nqe |
| 367 | 367 |
| 368 } // namespace net | 368 } // namespace net |
| OLD | NEW |