Create SSLErrorNavigationThrottle.
The committed interstitials project uses SSLErrorNavigationThrottle to watch for
failing requests that are certificate errors. It defers such requests, and then
cancels with the appropriate error code and error page content HTML based on the
blocking page it receives from calling SSLErrorHandler::HandleSSLError, via a
"blocking page ready callback".
To support this, HandleSSLError is updated to pass its constructed blocking page
to the blocking page ready callback when the callback is present, *instead* of
calling Show() on the blocking page. Since this passes ownership to the
SSLErrorNavigationThrottle, we also create a new SSLErrorTabHelper that
SSLErrorNavigationThrottle uses to associate a blocking page with its web
contents for as long as it'sr needed (i.e. until its navigation has committed
and the tab has subsequently navigated away).
Bug: 752370
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I6525912a28e48b9268aa0f9798b5e1b276cb25a6
Reviewed-on: https://chromium-review.googlesource.com/621236
Commit-Queue: Lucas Garron <[email protected]>
Reviewed-by: Emily Stark <[email protected]>
Reviewed-by: Camille Lamy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#515789}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 0081691..3231dd92 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -1375,6 +1375,10 @@
"ssl/ssl_error_assistant.h",
"ssl/ssl_error_handler.cc",
"ssl/ssl_error_handler.h",
+ "ssl/ssl_error_navigation_throttle.cc",
+ "ssl/ssl_error_navigation_throttle.h",
+ "ssl/ssl_error_tab_helper.cc",
+ "ssl/ssl_error_tab_helper.h",
"status_icons/status_icon.cc",
"status_icons/status_icon.h",
"status_icons/status_icon_menu_model.cc",