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/net/system_network_context_manager.cc | 2 +-
 components/cronet/url_request_context_config.cc      | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
--- a/chrome/browser/net/system_network_context_manager.cc
+++ b/chrome/browser/net/system_network_context_manager.cc
@@ -226,7 +226,7 @@ void OnAuthPrefsChanged(PrefService* local_state,
 // Android this includes checking the Android version in the field trial.
 bool ShouldEnableAsyncDns() {
   bool feature_can_be_enabled = true;
-#if defined(OS_ANDROID)
+#if 0
   int min_sdk =
       base::GetFieldTrialParamByFeatureAsInt(features::kAsyncDns, "min_sdk", 0);
   if (base::android::BuildInfo::GetInstance()->sdk_int() < min_sdk)
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
@@ -544,7 +544,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.11.0

