| 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 EffectiveConnectionType effective_connection_type = | 299 EffectiveConnectionType effective_connection_type = |
| 300 static_cast<EffectiveConnectionType>(i); | 300 static_cast<EffectiveConnectionType>(i); |
| 301 DCHECK_EQ(InvalidRTT(), connection_thresholds[i].http_rtt()); | 301 DCHECK_EQ(InvalidRTT(), connection_thresholds[i].http_rtt()); |
| 302 DCHECK_EQ(InvalidRTT(), connection_thresholds[i].transport_rtt()); | 302 DCHECK_EQ(InvalidRTT(), connection_thresholds[i].transport_rtt()); |
| 303 DCHECK_EQ(kInvalidThroughput, | 303 DCHECK_EQ(kInvalidThroughput, |
| 304 connection_thresholds[i].downstream_throughput_kbps()); | 304 connection_thresholds[i].downstream_throughput_kbps()); |
| 305 if (effective_connection_type == EFFECTIVE_CONNECTION_TYPE_UNKNOWN) | 305 if (effective_connection_type == EFFECTIVE_CONNECTION_TYPE_UNKNOWN) |
| 306 continue; | 306 continue; |
| 307 | 307 |
| 308 std::string connection_type_name = std::string( | 308 std::string connection_type_name = std::string( |
| 309 GetNameForEffectiveConnectionType(effective_connection_type)); | 309 DeprecatedGetNameForEffectiveConnectionType(effective_connection_type)); |
| 310 | 310 |
| 311 connection_thresholds[i].set_http_rtt( | 311 connection_thresholds[i].set_http_rtt( |
| 312 base::TimeDelta::FromMilliseconds(GetValueForVariationParam( | 312 base::TimeDelta::FromMilliseconds(GetValueForVariationParam( |
| 313 variation_params, | 313 variation_params, |
| 314 connection_type_name + ".ThresholdMedianHttpRTTMsec", | 314 connection_type_name + ".ThresholdMedianHttpRTTMsec", |
| 315 default_effective_connection_type_thresholds[i] | 315 default_effective_connection_type_thresholds[i] |
| 316 .http_rtt() | 316 .http_rtt() |
| 317 .InMilliseconds()))); | 317 .InMilliseconds()))); |
| 318 | 318 |
| 319 connection_thresholds[i].set_transport_rtt( | 319 connection_thresholds[i].set_transport_rtt( |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 // Use 1000 milliseconds as the default value. | 384 // Use 1000 milliseconds as the default value. |
| 385 return base::TimeDelta::FromMilliseconds(GetValueForVariationParam( | 385 return base::TimeDelta::FromMilliseconds(GetValueForVariationParam( |
| 386 variation_params, "min_socket_watcher_notification_interval_msec", 1000)); | 386 variation_params, "min_socket_watcher_notification_interval_msec", 1000)); |
| 387 } | 387 } |
| 388 | 388 |
| 389 } // namespace internal | 389 } // namespace internal |
| 390 | 390 |
| 391 } // namespace nqe | 391 } // namespace nqe |
| 392 | 392 |
| 393 } // namespace net | 393 } // namespace net |
| OLD | NEW |