summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/net/dns_util.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-02-13 10:55:42 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-03-05 13:33:38 +0000
commit248b70b82a40964d5594eb04feca0fa36716185d (patch)
tree44e31d9dd0ac2cb79f48633eefbc5496e013c347 /chromium/chrome/browser/net/dns_util.h
parentcabfcdd1db482729ded525feae56911a99792773 (diff)
downloadqtwebengine-chromium-248b70b82a40964d5594eb04feca0fa36716185d.tar.gz
BASELINE: Update Chromium to 79.0.3945.147
And new simplified snapshot filter Change-Id: I7c692bedd5b3833f05565bd6f6939115350b233a Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/chrome/browser/net/dns_util.h')
-rw-r--r--chromium/chrome/browser/net/dns_util.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/chromium/chrome/browser/net/dns_util.h b/chromium/chrome/browser/net/dns_util.h
new file mode 100644
index 00000000000..7935013d0f4
--- /dev/null
+++ b/chromium/chrome/browser/net/dns_util.h
@@ -0,0 +1,32 @@
+// Copyright 2019 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_NET_DNS_UTIL_H_
+#define CHROME_BROWSER_NET_DNS_UTIL_H_
+
+#include <string>
+
+namespace chrome_browser_net {
+
+// Returns true if the URI template is acceptable for sending requests. If so,
+// the |server_method| is set to "GET" if the template contains a "dns" variable
+// and to "POST" otherwise. Any "dns" variable may not be part of the hostname,
+// and the expanded template must parse to a valid HTTPS URL.
+bool IsValidDohTemplate(const std::string& server_template,
+ std::string* server_method);
+
+// Returns true if there are any active machine level policies or if the machine
+// is domain joined. This special logic is used to disable DoH by default for
+// Desktop platforms (the enterprise policy field default_for_enterprise_users
+// only applies to ChromeOS). We don't attempt enterprise detection on Android
+// at this time.
+bool ShouldDisableDohForManaged();
+
+const char kDnsOverHttpsModeOff[] = "off";
+const char kDnsOverHttpsModeAutomatic[] = "automatic";
+const char kDnsOverHttpsModeSecure[] = "secure";
+
+} // namespace chrome_browser_net
+
+#endif // CHROME_BROWSER_NET_DNS_UTIL_H_