| Index: chrome/browser/ssl/ssl_blocking_page.cc
|
| diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc
|
| index 21477857108b489e078f7c743730b123a42e246f..721df330a20067565798da191bc5eaf73c3992e9 100644
|
| --- a/chrome/browser/ssl/ssl_blocking_page.cc
|
| +++ b/chrome/browser/ssl/ssl_blocking_page.cc
|
| @@ -143,8 +143,10 @@ SSLBlockingPage::SSLBlockingPage(content::WebContents* web_contents,
|
| reporting_info.metric_prefix = GetUmaHistogramPrefix();
|
| reporting_info.rappor_prefix = kSSLRapporPrefix;
|
| reporting_info.rappor_report_type = rappor::UMA_RAPPOR_TYPE;
|
| - set_metrics_helper(new ChromeMetricsHelper(
|
| + scoped_ptr<ChromeMetricsHelper> chrome_metrics_helper(new ChromeMetricsHelper(
|
| web_contents, request_url, reporting_info, GetSamplingEventName()));
|
| + chrome_metrics_helper->StartRecordingCaptivePortalMetrics(overridable_);
|
| + set_metrics_helper(chrome_metrics_helper.Pass());
|
| metrics_helper()->RecordUserDecision(
|
| security_interstitials::MetricsHelper::SHOW);
|
| metrics_helper()->RecordUserInteraction(
|
| @@ -155,13 +157,9 @@ SSLBlockingPage::SSLBlockingPage(content::WebContents* web_contents,
|
| certificate_reporting::ErrorReport::INTERSTITIAL_SSL, overridable_,
|
| metrics_helper()));
|
|
|
| - ssl_error_classification_.reset(new SSLErrorClassification(
|
| - web_contents,
|
| - time_triggered_,
|
| - request_url,
|
| - cert_error_,
|
| - *ssl_info_.cert.get()));
|
| - ssl_error_classification_->RecordUMAStatistics(overridable_);
|
| + SSLErrorClassification error_classification(
|
| + time_triggered_, request_url, cert_error_, *ssl_info_.cert.get());
|
| + error_classification.RecordUMAStatistics(overridable_);
|
|
|
| // Creating an interstitial without showing (e.g. from chrome://interstitials)
|
| // it leaks memory, so don't create it here.
|
| @@ -176,11 +174,7 @@ InterstitialPageDelegate::TypeID SSLBlockingPage::GetTypeForTesting() const {
|
| }
|
|
|
| SSLBlockingPage::~SSLBlockingPage() {
|
| -#if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
|
| - // Captive portal detection results can arrive anytime during the interstitial
|
| - // is being displayed, so record it when the interstitial is going away.
|
| - ssl_error_classification_->RecordCaptivePortalUMAStatistics(overridable_);
|
| -#endif
|
| + metrics_helper()->RecordShutdownMetrics();
|
| if (!callback_.is_null()) {
|
| // The page is closed without the user having chosen what to do, default to
|
| // deny.
|
|
|