Commit a9285343 authored by Colin Blundell's avatar Colin Blundell Committed by Commit Bot

[WebLayer] Introduce SecurityBlockingPageFactory implementation

This CL introduces an implementation of the
//components/security_interstitials SecurityBlockingPageFactory
interface in //weblayer in preparation for //weblayer using the
component's SSLErrorHandler. In this CL we simply move the creation of
interstitial pages that is currently done in //weblayer's
ssl_error_handler.cc into the factory. We do not yet introduce
creation of interstitial pages that WebLayer does not currently create;
that will occur in a followup.

Bug: 1030692
Change-Id: I8fd776e29e502fab99c5b4966ed3ca5bebd2e5dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2028129Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737839}
parent 92c35e9c
...@@ -142,6 +142,8 @@ jumbo_static_library("weblayer_lib") { ...@@ -142,6 +142,8 @@ jumbo_static_library("weblayer_lib") {
"browser/weblayer_browser_interface_binders.h", "browser/weblayer_browser_interface_binders.h",
"browser/weblayer_content_browser_overlay_manifest.cc", "browser/weblayer_content_browser_overlay_manifest.cc",
"browser/weblayer_content_browser_overlay_manifest.h", "browser/weblayer_content_browser_overlay_manifest.h",
"browser/weblayer_security_blocking_page_factory.cc",
"browser/weblayer_security_blocking_page_factory.h",
"browser/webui/web_ui_controller_factory.cc", "browser/webui/web_ui_controller_factory.cc",
"browser/webui/web_ui_controller_factory.h", "browser/webui/web_ui_controller_factory.h",
"browser/webui/weblayer_internals_ui.cc", "browser/webui/weblayer_internals_ui.cc",
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "net/test/embedded_test_server/embedded_test_server.h" #include "net/test/embedded_test_server/embedded_test_server.h"
#include "weblayer/browser/browser_process.h" #include "weblayer/browser/browser_process.h"
#include "weblayer/browser/ssl_error_handler.h" #include "weblayer/browser/ssl_error_handler.h"
#include "weblayer/browser/weblayer_security_blocking_page_factory.h"
#include "weblayer/shell/browser/shell.h" #include "weblayer/shell/browser/shell.h"
#include "weblayer/test/interstitial_utils.h" #include "weblayer/test/interstitial_utils.h"
#include "weblayer/test/load_completion_observer.h" #include "weblayer/test/load_completion_observer.h"
...@@ -166,7 +167,8 @@ class SSLBrowserTest : public WebLayerBrowserTest { ...@@ -166,7 +167,8 @@ class SSLBrowserTest : public WebLayerBrowserTest {
// Note: The embedded test server cannot actually load the captive portal // Note: The embedded test server cannot actually load the captive portal
// login URL, so simply detect the start of the navigation to the page. // login URL, so simply detect the start of the navigation to the page.
TestNavigationObserver navigation_observer( TestNavigationObserver navigation_observer(
GetCaptivePortalLoginPageUrlForTesting(), WebLayerSecurityBlockingPageFactory::
GetCaptivePortalLoginPageUrlForTesting(),
TestNavigationObserver::NavigationEvent::kStart, shell()); TestNavigationObserver::NavigationEvent::kStart, shell());
ExecuteScript(shell(), "window.certificateErrorPageController.openLogin();", ExecuteScript(shell(), "window.certificateErrorPageController.openLogin();",
false /*use_separate_isolate*/); false /*use_separate_isolate*/);
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "build/build_config.h" #include "build/build_config.h"
#include "components/security_interstitials/content/bad_clock_blocking_page.h" #include "components/security_interstitials/content/bad_clock_blocking_page.h"
#include "components/security_interstitials/content/captive_portal_blocking_page.h" #include "components/security_interstitials/content/captive_portal_blocking_page.h"
#include "components/security_interstitials/content/ssl_blocking_page.h"
#include "components/security_interstitials/content/ssl_cert_reporter.h" #include "components/security_interstitials/content/ssl_cert_reporter.h"
#include "components/security_interstitials/content/ssl_error_navigation_throttle.h" #include "components/security_interstitials/content/ssl_error_navigation_throttle.h"
#include "components/security_interstitials/core/metrics_helper.h" #include "components/security_interstitials/core/metrics_helper.h"
...@@ -18,13 +17,10 @@ ...@@ -18,13 +17,10 @@
#include "weblayer/browser/browser_process.h" #include "weblayer/browser/browser_process.h"
#include "weblayer/browser/ssl_error_controller_client.h" #include "weblayer/browser/ssl_error_controller_client.h"
#include "weblayer/browser/weblayer_content_browser_overlay_manifest.h" #include "weblayer/browser/weblayer_content_browser_overlay_manifest.h"
#include "weblayer/browser/weblayer_security_blocking_page_factory.h"
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/referrer.h"
#include "net/android/network_library.h" #include "net/android/network_library.h"
#include "ui/base/window_open_disposition.h"
#endif #endif
namespace weblayer { namespace weblayer {
...@@ -48,32 +44,6 @@ bool IsBehindCaptivePortal() { ...@@ -48,32 +44,6 @@ bool IsBehindCaptivePortal() {
#endif #endif
} }
#if defined(OS_ANDROID)
GURL GetCaptivePortalLoginPageUrlInternal() {
// NOTE: This is taken from the default login URL in //chrome's
// CaptivePortalHelper.java, which is used in the implementation referenced
// in OpenLoginPage() below.
return GURL("http://connectivitycheck.gstatic.com/generate_204");
}
#endif
void OpenLoginPage(content::WebContents* web_contents) {
// TODO(https://crbug.com/1030692): Componentize and share the
// Android implementation from //chrome's
// ChromeSecurityBlockingPageFactory::OpenLoginPage(), from which this is
// adapted.
#if defined(OS_ANDROID)
// NOTE: In Chrome this opens in a new tab; however, as WebLayer doesn't have
// the ability to open new tabs it must open in the current tab.
content::OpenURLParams params(
GetCaptivePortalLoginPageUrlInternal(), content::Referrer(),
WindowOpenDisposition::CURRENT_TAB, ui::PAGE_TRANSITION_LINK, false);
web_contents->OpenURL(params);
#else
NOTIMPLEMENTED();
#endif
}
// Constructs and shows a captive portal interstitial. Adapted from //chrome's // Constructs and shows a captive portal interstitial. Adapted from //chrome's
// SSLErrorHandlerDelegateImpl::ShowCaptivePortalInterstitial(). // SSLErrorHandlerDelegateImpl::ShowCaptivePortalInterstitial().
void ShowCaptivePortalInterstitial( void ShowCaptivePortalInterstitial(
...@@ -85,31 +55,21 @@ void ShowCaptivePortalInterstitial( ...@@ -85,31 +55,21 @@ void ShowCaptivePortalInterstitial(
base::OnceCallback< base::OnceCallback<
void(std::unique_ptr<security_interstitials::SecurityInterstitialPage>)> void(std::unique_ptr<security_interstitials::SecurityInterstitialPage>)>
blocking_page_ready_callback) { blocking_page_ready_callback) {
security_interstitials::MetricsHelper::ReportDetails report_details;
report_details.metric_prefix = "captive_portal";
auto metrics_helper = std::make_unique<security_interstitials::MetricsHelper>(
request_url, report_details, /*history_service=*/nullptr);
auto controller_client = std::make_unique<SSLErrorControllerClient>(
web_contents, cert_error, ssl_info, request_url,
std::move(metrics_helper));
// When captive portals are detected by the underlying platform (the only // When captive portals are detected by the underlying platform (the only
// context in which captive portals are currently detected in WebLayer), // context in which captive portals are currently detected in WebLayer),
// the login URL is not specified by the client but is determined internally. // the login URL is not specified by the client but is determined internally.
GURL login_url; GURL login_url;
auto* interstitial_page = new CaptivePortalBlockingPage(
web_contents, request_url, login_url, std::move(ssl_cert_reporter),
ssl_info, std::move(controller_client),
base::BindRepeating(&OpenLoginPage));
// Note: |blocking_page_ready_callback| must be posted due to // Note: |blocking_page_ready_callback| must be posted due to
// HandleSSLError()'s guarantee that it will not invoke this callback // HandleSSLError()'s guarantee that it will not invoke this callback
// synchronously. // synchronously.
WebLayerSecurityBlockingPageFactory blocking_page_factory;
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(std::move(blocking_page_ready_callback), FROM_HERE,
base::WrapUnique(interstitial_page))); base::BindOnce(std::move(blocking_page_ready_callback),
blocking_page_factory.CreateCaptivePortalBlockingPage(
web_contents, request_url, login_url,
std::move(ssl_cert_reporter), ssl_info, cert_error)));
} }
// Constructs and shows an SSL interstitial. Adapted from //chrome's // Constructs and shows an SSL interstitial. Adapted from //chrome's
...@@ -124,29 +84,18 @@ void ShowSSLInterstitial( ...@@ -124,29 +84,18 @@ void ShowSSLInterstitial(
void(std::unique_ptr<security_interstitials::SecurityInterstitialPage>)> void(std::unique_ptr<security_interstitials::SecurityInterstitialPage>)>
blocking_page_ready_callback, blocking_page_ready_callback,
int options_mask) { int options_mask) {
bool overridable = SSLBlockingPage::IsOverridable(options_mask);
security_interstitials::MetricsHelper::ReportDetails report_details;
report_details.metric_prefix =
overridable ? "ssl_overridable" : "ssl_nonoverridable";
auto metrics_helper = std::make_unique<security_interstitials::MetricsHelper>(
request_url, report_details, /*history_service=*/nullptr);
auto controller_client = std::make_unique<SSLErrorControllerClient>(
web_contents, cert_error, ssl_info, request_url,
std::move(metrics_helper));
auto* interstitial_page = new SSLBlockingPage(
web_contents, cert_error, ssl_info, request_url, options_mask,
base::Time::NowFromSystemTime(), /*support_url=*/GURL(),
std::move(ssl_cert_reporter), overridable, std::move(controller_client));
// Note: |blocking_page_ready_callback| must be posted due to // Note: |blocking_page_ready_callback| must be posted due to
// HandleSSLError()'s guarantee that it will not invoke this callback // HandleSSLError()'s guarantee that it will not invoke this callback
// synchronously. // synchronously.
WebLayerSecurityBlockingPageFactory blocking_page_factory;
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(std::move(blocking_page_ready_callback), FROM_HERE,
base::WrapUnique(interstitial_page))); base::BindOnce(
std::move(blocking_page_ready_callback),
blocking_page_factory.CreateSSLPage(
web_contents, cert_error, ssl_info, request_url, options_mask,
base::Time::NowFromSystemTime(), /*support_url=*/GURL(),
std::move(ssl_cert_reporter))));
} }
// Constructs and shows a bad clock interstitial. Adapted from //chrome's // Constructs and shows a bad clock interstitial. Adapted from //chrome's
...@@ -161,26 +110,17 @@ void ShowBadClockInterstitial( ...@@ -161,26 +110,17 @@ void ShowBadClockInterstitial(
base::OnceCallback< base::OnceCallback<
void(std::unique_ptr<security_interstitials::SecurityInterstitialPage>)> void(std::unique_ptr<security_interstitials::SecurityInterstitialPage>)>
blocking_page_ready_callback) { blocking_page_ready_callback) {
security_interstitials::MetricsHelper::ReportDetails report_details;
report_details.metric_prefix = "bad_clock";
auto metrics_helper = std::make_unique<security_interstitials::MetricsHelper>(
request_url, report_details, /*history_service=*/nullptr);
auto controller_client = std::make_unique<SSLErrorControllerClient>(
web_contents, cert_error, ssl_info, request_url,
std::move(metrics_helper));
auto* interstitial_page = new BadClockBlockingPage(
web_contents, cert_error, ssl_info, request_url,
base::Time::NowFromSystemTime(), clock_state,
std::move(ssl_cert_reporter), std::move(controller_client));
// Note: |blocking_page_ready_callback| must be posted due to // Note: |blocking_page_ready_callback| must be posted due to
// HandleSSLError()'s guarantee that it will not invoke this callback // HandleSSLError()'s guarantee that it will not invoke this callback
// synchronously. // synchronously.
WebLayerSecurityBlockingPageFactory blocking_page_factory;
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(std::move(blocking_page_ready_callback), FROM_HERE,
base::WrapUnique(interstitial_page))); base::BindOnce(std::move(blocking_page_ready_callback),
blocking_page_factory.CreateBadClockBlockingPage(
web_contents, cert_error, ssl_info, request_url,
base::Time::NowFromSystemTime(), clock_state,
std::move(ssl_cert_reporter))));
} }
} // namespace } // namespace
...@@ -256,10 +196,4 @@ void SetDiagnoseSSLErrorsAsCaptivePortalForTesting(bool enabled) { ...@@ -256,10 +196,4 @@ void SetDiagnoseSSLErrorsAsCaptivePortalForTesting(bool enabled) {
g_is_behind_captive_portal_for_testing = enabled; g_is_behind_captive_portal_for_testing = enabled;
} }
#if defined(OS_ANDROID)
GURL GetCaptivePortalLoginPageUrlForTesting() {
return GetCaptivePortalLoginPageUrlInternal();
}
#endif
} // namespace weblayer } // namespace weblayer
...@@ -46,13 +46,6 @@ void HandleSSLError(content::WebContents* web_contents, ...@@ -46,13 +46,6 @@ void HandleSSLError(content::WebContents* web_contents,
// portals. // portals.
void SetDiagnoseSSLErrorsAsCaptivePortalForTesting(bool enabled); void SetDiagnoseSSLErrorsAsCaptivePortalForTesting(bool enabled);
#if defined(OS_ANDROID)
// Returns the URL that will be navigated to when the user clicks on the
// "Connect" button of the captive portal interstitial. Used by tests to
// verify this flow.
GURL GetCaptivePortalLoginPageUrlForTesting();
#endif
} // namespace weblayer } // namespace weblayer
#endif // WEBLAYER_BROWSER_SSL_ERROR_HANDLER_H_ #endif // WEBLAYER_BROWSER_SSL_ERROR_HANDLER_H_
// Copyright 2020 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.
#include "weblayer/browser/weblayer_security_blocking_page_factory.h"
#include "components/security_interstitials/content/ssl_blocking_page.h"
#include "components/security_interstitials/core/metrics_helper.h"
#include "weblayer/browser/ssl_error_controller_client.h"
#if defined(OS_ANDROID)
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/referrer.h"
#include "ui/base/window_open_disposition.h"
#endif
namespace weblayer {
namespace {
#if defined(OS_ANDROID)
GURL GetCaptivePortalLoginPageUrlInternal() {
// NOTE: This is taken from the default login URL in //chrome's
// CaptivePortalHelper.java, which is used in the implementation referenced
// in OpenLoginPage() below.
return GURL("http://connectivitycheck.gstatic.com/generate_204");
}
#endif
void OpenLoginPage(content::WebContents* web_contents) {
// TODO(https://crbug.com/1030692): Componentize and share the
// Android implementation from //chrome's
// ChromeSecurityBlockingPageFactory::OpenLoginPage(), from which this is
// adapted.
#if defined(OS_ANDROID)
// In Chrome this opens in a new tab, but WebLayer's TabImpl has no support
// for opening new tabs (its OpenURLFromTab() method DCHECKs if the
// disposition is not |CURRENT_TAB|).
// TODO(crbug.com/1047130): Revisit if TabImpl gets support for opening URLs
// in new tabs.
content::OpenURLParams params(
GetCaptivePortalLoginPageUrlInternal(), content::Referrer(),
WindowOpenDisposition::CURRENT_TAB, ui::PAGE_TRANSITION_LINK, false);
web_contents->OpenURL(params);
#else
NOTIMPLEMENTED();
#endif
}
} // namespace
std::unique_ptr<SSLBlockingPage>
WebLayerSecurityBlockingPageFactory::CreateSSLPage(
content::WebContents* web_contents,
int cert_error,
const net::SSLInfo& ssl_info,
const GURL& request_url,
int options_mask,
const base::Time& time_triggered,
const GURL& support_url,
std::unique_ptr<SSLCertReporter> ssl_cert_reporter) {
bool overridable = SSLBlockingPage::IsOverridable(options_mask);
security_interstitials::MetricsHelper::ReportDetails report_details;
report_details.metric_prefix =
overridable ? "ssl_overridable" : "ssl_nonoverridable";
auto metrics_helper = std::make_unique<security_interstitials::MetricsHelper>(
request_url, report_details, /*history_service=*/nullptr);
auto controller_client = std::make_unique<SSLErrorControllerClient>(
web_contents, cert_error, ssl_info, request_url,
std::move(metrics_helper));
auto interstitial_page = std::make_unique<SSLBlockingPage>(
web_contents, cert_error, ssl_info, request_url, options_mask,
base::Time::NowFromSystemTime(), /*support_url=*/GURL(),
std::move(ssl_cert_reporter), overridable, std::move(controller_client));
return interstitial_page;
}
std::unique_ptr<CaptivePortalBlockingPage>
WebLayerSecurityBlockingPageFactory::CreateCaptivePortalBlockingPage(
content::WebContents* web_contents,
const GURL& request_url,
const GURL& login_url,
std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
const net::SSLInfo& ssl_info,
int cert_error) {
security_interstitials::MetricsHelper::ReportDetails report_details;
report_details.metric_prefix = "captive_portal";
auto metrics_helper = std::make_unique<security_interstitials::MetricsHelper>(
request_url, report_details, /*history_service=*/nullptr);
auto controller_client = std::make_unique<SSLErrorControllerClient>(
web_contents, cert_error, ssl_info, request_url,
std::move(metrics_helper));
auto interstitial_page = std::make_unique<CaptivePortalBlockingPage>(
web_contents, request_url, login_url, std::move(ssl_cert_reporter),
ssl_info, std::move(controller_client),
base::BindRepeating(&OpenLoginPage));
return interstitial_page;
}
std::unique_ptr<BadClockBlockingPage>
WebLayerSecurityBlockingPageFactory::CreateBadClockBlockingPage(
content::WebContents* web_contents,
int cert_error,
const net::SSLInfo& ssl_info,
const GURL& request_url,
const base::Time& time_triggered,
ssl_errors::ClockState clock_state,
std::unique_ptr<SSLCertReporter> ssl_cert_reporter) {
security_interstitials::MetricsHelper::ReportDetails report_details;
report_details.metric_prefix = "bad_clock";
auto metrics_helper = std::make_unique<security_interstitials::MetricsHelper>(
request_url, report_details, /*history_service=*/nullptr);
auto controller_client = std::make_unique<SSLErrorControllerClient>(
web_contents, cert_error, ssl_info, request_url,
std::move(metrics_helper));
auto interstitial_page = std::make_unique<BadClockBlockingPage>(
web_contents, cert_error, ssl_info, request_url,
base::Time::NowFromSystemTime(), clock_state,
std::move(ssl_cert_reporter), std::move(controller_client));
return interstitial_page;
}
std::unique_ptr<LegacyTLSBlockingPage>
WebLayerSecurityBlockingPageFactory::CreateLegacyTLSBlockingPage(
content::WebContents* web_contents,
int cert_error,
const GURL& request_url,
std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
const net::SSLInfo& ssl_info) {
// TODO (crbug.com/1030692): Implement.
return nullptr;
}
std::unique_ptr<MITMSoftwareBlockingPage>
WebLayerSecurityBlockingPageFactory::CreateMITMSoftwareBlockingPage(
content::WebContents* web_contents,
int cert_error,
const GURL& request_url,
std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
const net::SSLInfo& ssl_info,
const std::string& mitm_software_name) {
// TODO (crbug.com/1030692): Implement.
return nullptr;
}
std::unique_ptr<BlockedInterceptionBlockingPage>
WebLayerSecurityBlockingPageFactory::CreateBlockedInterceptionBlockingPage(
content::WebContents* web_contents,
int cert_error,
const GURL& request_url,
std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
const net::SSLInfo& ssl_info) {
// TODO (crbug.com/1030692): Implement.
return nullptr;
}
#if defined(OS_ANDROID)
// static
GURL WebLayerSecurityBlockingPageFactory::
GetCaptivePortalLoginPageUrlForTesting() {
return GetCaptivePortalLoginPageUrlInternal();
}
#endif
} // namespace weblayer
// Copyright 2020 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 WEBLAYER_BROWSER_WEBLAYER_SECURITY_BLOCKING_PAGE_FACTORY_H_
#define WEBLAYER_BROWSER_WEBLAYER_SECURITY_BLOCKING_PAGE_FACTORY_H_
#include "base/macros.h"
#include "build/build_config.h"
#include "components/captive_portal/core/buildflags.h"
#include "components/security_interstitials/content/bad_clock_blocking_page.h"
#include "components/security_interstitials/content/blocked_interception_blocking_page.h"
#include "components/security_interstitials/content/captive_portal_blocking_page.h"
#include "components/security_interstitials/content/mitm_software_blocking_page.h"
#include "components/security_interstitials/content/security_blocking_page_factory.h"
#include "components/security_interstitials/content/ssl_blocking_page.h"
#include "components/security_interstitials/content/ssl_blocking_page_base.h"
namespace weblayer {
// //weblayer's implementation of the SecurityBlockingPageFactory interface.
class WebLayerSecurityBlockingPageFactory : public SecurityBlockingPageFactory {
public:
WebLayerSecurityBlockingPageFactory() = default;
~WebLayerSecurityBlockingPageFactory() override = default;
WebLayerSecurityBlockingPageFactory(
const WebLayerSecurityBlockingPageFactory&) = delete;
WebLayerSecurityBlockingPageFactory& operator=(
const WebLayerSecurityBlockingPageFactory&) = delete;
// SecurityBlockingPageFactory:
std::unique_ptr<SSLBlockingPage> CreateSSLPage(
content::WebContents* web_contents,
int cert_error,
const net::SSLInfo& ssl_info,
const GURL& request_url,
int options_mask,
const base::Time& time_triggered,
const GURL& support_url,
std::unique_ptr<SSLCertReporter> ssl_cert_reporter) override;
std::unique_ptr<CaptivePortalBlockingPage> CreateCaptivePortalBlockingPage(
content::WebContents* web_contents,
const GURL& request_url,
const GURL& login_url,
std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
const net::SSLInfo& ssl_info,
int cert_error) override;
std::unique_ptr<BadClockBlockingPage> CreateBadClockBlockingPage(
content::WebContents* web_contents,
int cert_error,
const net::SSLInfo& ssl_info,
const GURL& request_url,
const base::Time& time_triggered,
ssl_errors::ClockState clock_state,
std::unique_ptr<SSLCertReporter> ssl_cert_reporter) override;
std::unique_ptr<LegacyTLSBlockingPage> CreateLegacyTLSBlockingPage(
content::WebContents* web_contents,
int cert_error,
const GURL& request_url,
std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
const net::SSLInfo& ssl_info) override;
std::unique_ptr<MITMSoftwareBlockingPage> CreateMITMSoftwareBlockingPage(
content::WebContents* web_contents,
int cert_error,
const GURL& request_url,
std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
const net::SSLInfo& ssl_info,
const std::string& mitm_software_name) override;
std::unique_ptr<BlockedInterceptionBlockingPage>
CreateBlockedInterceptionBlockingPage(
content::WebContents* web_contents,
int cert_error,
const GURL& request_url,
std::unique_ptr<SSLCertReporter> ssl_cert_reporter,
const net::SSLInfo& ssl_info) override;
#if defined(OS_ANDROID)
// Returns the URL that will be navigated to when the user clicks on the
// "Connect" button of the captive portal interstitial. Used by tests to
// verify this flow.
static GURL GetCaptivePortalLoginPageUrlForTesting();
#endif
};
} // namespace weblayer
#endif // WEBLAYER_BROWSER_WEBLAYER_SECURITY_BLOCKING_PAGE_FACTORY_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment