Default typed omnibox navigations to HTTPS: Initial implementation

Presently, when a user types a domain name in the omnibox such as
"example.com", Chrome navigations to the HTTP version of the site
(http://example.com). However, the web is increasingly moving towards
HTTPS, and we now want to optimize omnibox navigations and first-load
performance for HTTPS, rather than HTTP.

This CL implements an initial version of defaulting typed omnibox
navigations to HTTPS. In particular, the CL:
- Modifies omnibox and autocomplete code to use HTTPS as the default
  scheme for navigations. We call these "upgraded HTTPS navigations".
- Observes upgraded HTTPS navigations until completion and falls back
  to the HTTP version of the URL if the HTTPS load fails. It does this
  by introducing a new navigation throttle called
  TypedNavigationUpgradeThrottle.
 - Ignores SSL errrs in SSLErrorNavigationThrottle if the navigation was
  an HTTPS upgrade in order to prevent displaying spurious SSL
  interstitials.

Most of the files touched by the CL have plumbing changes: The
navigation throttle needs to know whether the navigation was upgraded,
so this information is provided by the omnibox via
is_using_https_as_default_scheme bit and stored inside the UIData of the
navigation handle.

This is a minimal implementation and is not ready for general usage.
Future CLs are going to observe upgraded HTTPS navigations for several
seconds instead and cancel the load when necessary, instead of
indefinitely waiting for HTTPS loads to succeed. This CL also lacks many
quality of life improvements such as remembering which URLs fell back to
HTTP. These will also be added in future CLs.

Bug: 1141691
Change-Id: Ie78a34bfa51fc995e9834d491ea43b7cac17598c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2568448
Commit-Queue: Mustafa Emre Acer <[email protected]>
Reviewed-by: Clark DuVall <[email protected]>
Reviewed-by: Justin Donnelly <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Peter Kasting <[email protected]>
Reviewed-by: Emily Stark <[email protected]>
Reviewed-by: Chris Thompson <[email protected]>
Cr-Commit-Position: refs/heads/master@{#840253}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 5e9ffeeb..22336d28 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -1779,6 +1779,8 @@
     "ssl/stateful_ssl_host_state_delegate_factory.h",
     "ssl/tls_deprecation_config.cc",
     "ssl/tls_deprecation_config.h",
+    "ssl/typed_navigation_upgrade_throttle.cc",
+    "ssl/typed_navigation_upgrade_throttle.h",
     "startup_data.cc",
     "startup_data.h",
     "status_icons/status_icon.cc",