| 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 bool persistent_cache_reading_enabled( | 372 bool persistent_cache_reading_enabled( |
| 373 const std::map<std::string, std::string>& variation_params) { | 373 const std::map<std::string, std::string>& variation_params) { |
| 374 if (GetStringValueForVariationParamWithDefaultValue( | 374 if (GetStringValueForVariationParamWithDefaultValue( |
| 375 variation_params, "persistent_cache_reading_enabled", "false") != | 375 variation_params, "persistent_cache_reading_enabled", "false") != |
| 376 "true") { | 376 "true") { |
| 377 return false; | 377 return false; |
| 378 } | 378 } |
| 379 return true; | 379 return true; |
| 380 } | 380 } |
| 381 | 381 |
| 382 base::TimeDelta GetMinSocketWatcherNotificationInterval( |
| 383 const std::map<std::string, std::string>& variation_params) { |
| 384 // Use 1000 milliseconds as the default value. |
| 385 return base::TimeDelta::FromMilliseconds(GetValueForVariationParam( |
| 386 variation_params, "min_socket_watcher_notification_interval_msec", 1000)); |
| 387 } |
| 388 |
| 382 } // namespace internal | 389 } // namespace internal |
| 383 | 390 |
| 384 } // namespace nqe | 391 } // namespace nqe |
| 385 | 392 |
| 386 } // namespace net | 393 } // namespace net |
| OLD | NEW |