Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6278)

Unified Diff: chrome/browser/ssl/ssl_blocking_page.cc

Issue 1365733005: Split captive portal metrics out of SSLErrorClassification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compiler error fix possibly for realsies Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.h ('k') | chrome/browser/ssl/ssl_error_classification.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.h ('k') | chrome/browser/ssl/ssl_error_classification.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698