| Index: chrome/browser/ssl/ssl_error_handler.h
|
| diff --git a/chrome/browser/ssl/ssl_error_handler.h b/chrome/browser/ssl/ssl_error_handler.h
|
| index 44213c1c130e3f78545c18f19b18f04f75d430ff..7dfaad53d727884cc44d7f774222d02dc6d2a2aa 100644
|
| --- a/chrome/browser/ssl/ssl_error_handler.h
|
| +++ b/chrome/browser/ssl/ssl_error_handler.h
|
| @@ -15,6 +15,7 @@
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ssl/common_name_mismatch_handler.h"
|
| #include "chrome/browser/ssl/ssl_cert_reporter.h"
|
| +#include "chrome/browser/ssl/tls_error_assistant.pb.h"
|
| #include "components/ssl_errors/error_classification.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "content/public/browser/notification_registrar.h"
|
| @@ -43,10 +44,13 @@ class NetworkTimeTracker;
|
| // This class is responsible for deciding what type of interstitial to show for
|
| // an SSL validation error. The display of the interstitial might be delayed by
|
| // a few seconds while trying to determine the cause of the error. During this
|
| -// window, the class will: check for a clock error, wait for a name-mismatch
|
| -// suggested URL, or wait for a captive portal result to arrive. If there is a
|
| -// name mismatch error and a corresponding suggested URL result arrives in this
|
| -// window, the user is redirected to the suggested URL.
|
| +// window, the class will:
|
| +// - Check for a clock error
|
| +// - Check for a known captive portal SPKI
|
| +// - Wait for a name-mismatch suggested URL
|
| +// - or Wait for a captive portal result to arrive.
|
| +// If there is a name mismatch error and a corresponding suggested URL result
|
| +// arrives in this window, the user is redirected to the suggested URL.
|
| // Failing that, if a captive portal detected result arrives in the time window,
|
| // a captive portal error page is shown. If none of these potential error
|
| // causes match, an SSL interstitial is shown.
|
| @@ -60,6 +64,21 @@ class SSLErrorHandler : public content::WebContentsUserData<SSLErrorHandler>,
|
| public:
|
| typedef base::Callback<void(content::WebContents*)> TimerStartedCallback;
|
|
|
| + // Events for UMA. Public for testing.
|
| + enum UMAEvent {
|
| + HANDLE_ALL,
|
| + SHOW_CAPTIVE_PORTAL_INTERSTITIAL_NONOVERRIDABLE,
|
| + SHOW_CAPTIVE_PORTAL_INTERSTITIAL_OVERRIDABLE,
|
| + SHOW_SSL_INTERSTITIAL_NONOVERRIDABLE,
|
| + SHOW_SSL_INTERSTITIAL_OVERRIDABLE,
|
| + WWW_MISMATCH_FOUND,
|
| + WWW_MISMATCH_URL_AVAILABLE,
|
| + WWW_MISMATCH_URL_NOT_AVAILABLE,
|
| + SHOW_BAD_CLOCK,
|
| + CAPTIVE_PORTAL_CERT_FOUND,
|
| + SSL_ERROR_HANDLER_EVENT_COUNT
|
| + };
|
| +
|
| // Entry point for the class. The parameters are the same as SSLBlockingPage
|
| // constructor.
|
| static void HandleSSLError(
|
| @@ -80,6 +99,10 @@ class SSLErrorHandler : public content::WebContentsUserData<SSLErrorHandler>,
|
| static void SetClockForTesting(base::Clock* testing_clock);
|
| static void SetNetworkTimeTrackerForTesting(
|
| network_time::NetworkTimeTracker* tracker);
|
| + static void SetErrorAssistantProtoForTesting(
|
| + const chrome_browser_ssl::TLSErrorAssistantConfig& config_proto);
|
| +
|
| + static std::string GetHistogramNameForTesting();
|
|
|
| protected:
|
| // The parameters are the same as SSLBlockingPage's constructor.
|
|
|