Index: components/cronet/url_request_context_config.cc |
diff --git a/components/cronet/url_request_context_config.cc b/components/cronet/url_request_context_config.cc |
index 16bd87fa42719aa48d981ff2977bd6e991edd141..f88a8765f8ac6d21c4ecc8778e29519a3f420215 100644 |
--- a/components/cronet/url_request_context_config.cc |
+++ b/components/cronet/url_request_context_config.cc |
@@ -79,6 +79,9 @@ const char kStaleDnsAllowOtherNetwork[] = "allow_other_network"; |
const char kHostResolverRulesFieldTrialName[] = "HostResolverRules"; |
const char kHostResolverRules[] = "host_resolver_rules"; |
+// NetworkQualityEstimator experiment dictionary name. |
+const char kNetworkQualityEstimatorFieldTrialName[] = "NetworkQualityEstimator"; |
+ |
// Disable IPv6 when on WiFi. This is a workaround for a known issue on certain |
// Android phones, and should not be necessary when not on one of those devices. |
// See https://crbug.com/696569 for details. |
@@ -275,6 +278,13 @@ std::unique_ptr<base::DictionaryValue> ParseAndSetExperimentalOptions( |
file_task_runner); |
} |
} |
+ } else if (it.key() == kNetworkQualityEstimatorFieldTrialName) { |
+ const base::DictionaryValue* nqe_args = nullptr; |
+ if (!it.value().GetAsDictionary(&nqe_args)) { |
+ LOG(ERROR) << "\"" << it.key() << "\" config params \"" << it.value() |
+ << "\" is not a dictionary value"; |
+ effective_experimental_options->Remove(it.key(), nullptr); |
+ } |
} else { |
LOG(WARNING) << "Unrecognized Cronet experimental option \"" << it.key() |
<< "\" with params \"" << it.value(); |
@@ -353,12 +363,12 @@ URLRequestContextConfig::URLRequestContextConfig( |
load_disable_cache(load_disable_cache), |
storage_path(storage_path), |
user_agent(user_agent), |
- experimental_options(experimental_options), |
mock_cert_verifier(std::move(mock_cert_verifier)), |
enable_network_quality_estimator(enable_network_quality_estimator), |
bypass_public_key_pinning_for_local_trust_anchors( |
bypass_public_key_pinning_for_local_trust_anchors), |
- cert_verifier_data(cert_verifier_data) {} |
+ cert_verifier_data(cert_verifier_data), |
+ experimental_options(experimental_options) {} |
URLRequestContextConfig::~URLRequestContextConfig() {} |