Chromium Code Reviews| Index: chrome/browser/io_thread.cc |
| diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc |
| index 4e730e6c6f346b79c4749d51b6e70b3114fbb0ec..e79b83a422abc1352425af6eb565b34e2a054f0c 100644 |
| --- a/chrome/browser/io_thread.cc |
| +++ b/chrome/browser/io_thread.cc |
| @@ -91,6 +91,7 @@ |
| #include "net/net_features.h" |
| #include "net/nqe/external_estimate_provider.h" |
| #include "net/nqe/network_quality_estimator.h" |
| +#include "net/nqe/network_quality_estimator_params.h" |
| #include "net/proxy/proxy_config_service.h" |
| #include "net/proxy/proxy_script_fetcher_impl.h" |
| #include "net/proxy/proxy_service.h" |
| @@ -560,6 +561,19 @@ void IOThread::Init() { |
| variations::GetVariationParams(kNetworkQualityEstimatorFieldTrialName, |
| &network_quality_estimator_params); |
| + if (command_line.HasSwitch(switches::kForceEffectiveConnectionType)) { |
| + const std::string force_ect_value = |
| + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| + switches::kForceEffectiveConnectionType); |
| + |
| + if (!force_ect_value.empty()) { |
| + // If the effective connection type is forced using command line switch, |
| + // it overrides the one set by field trial. |
| + network_quality_estimator_params[net::kForceEffectiveConnectionType] = |
| + force_ect_value; |
| + } |
| + } |
|
mmenke
2017/05/02 16:09:43
Not going to block on this, but for network stack
|
| + |
| std::unique_ptr<net::ExternalEstimateProvider> external_estimate_provider; |
| #if defined(OS_ANDROID) |
| external_estimate_provider.reset( |