12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- From: csagan5 <32685696+csagan5@users.noreply.github.com>
- Date: Tue, 5 Jun 2018 13:46:40 +0200
- Subject: Always respect async dns flag (regardless of SDK version), do not
- read experiment value for cronet async DNS configuration
- ---
- chrome/browser/io_thread.cc | 10 +---------
- components/cronet/url_request_context_config.cc | 3 ++-
- 2 files changed, 3 insertions(+), 10 deletions(-)
- diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
- --- a/chrome/browser/io_thread.cc
- +++ b/chrome/browser/io_thread.cc
- @@ -257,15 +257,7 @@ void UpdateMetricsUsagePrefsOnUIThread(const std::string& service_name,
- // Check the AsyncDns field trial and return true if it should be enabled. On
- // Android this includes checking the Android version in the field trial.
- bool ShouldEnableAsyncDns() {
- - bool feature_can_be_enabled = true;
- -#if defined(OS_ANDROID)
- - int min_sdk =
- - base::GetFieldTrialParamByFeatureAsInt(features::kAsyncDns, "min_sdk", 0);
- - if (base::android::BuildInfo::GetInstance()->sdk_int() < min_sdk)
- - feature_can_be_enabled = false;
- -#endif
- - return feature_can_be_enabled &&
- - base::FeatureList::IsEnabled(features::kAsyncDns);
- + return base::FeatureList::IsEnabled(features::kAsyncDns);
- }
-
- } // namespace
- diff --git a/components/cronet/url_request_context_config.cc b/components/cronet/url_request_context_config.cc
- --- a/components/cronet/url_request_context_config.cc
- +++ b/components/cronet/url_request_context_config.cc
- @@ -398,7 +398,8 @@ void URLRequestContextConfig::ParseAndSetExperimentalOptions(
- effective_experimental_options->Remove(it.key(), nullptr);
- continue;
- }
- - async_dns_args->GetBoolean(kAsyncDnsEnable, &async_dns_enable);
- + bool ignored;
- + async_dns_args->GetBoolean(kAsyncDnsEnable, &ignored);
- } else if (it.key() == kStaleDnsFieldTrialName) {
- const base::DictionaryValue* stale_dns_args = nullptr;
- if (!it.value().GetAsDictionary(&stale_dns_args)) {
- --
- 2.7.4
|