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

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

Issue 914253004: Fix captive portal histogram in SSL interstitials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
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 214c035317d472aeb545d1b119b16fe900a7a83a..8caf34b669594b4efc32d78cf883ed28a92eb04f 100644
--- a/chrome/browser/ssl/ssl_blocking_page.cc
+++ b/chrome/browser/ssl/ssl_blocking_page.cc
@@ -247,9 +247,6 @@ SSLBlockingPage::SSLBlockingPage(content::WebContents* web_contents,
cert_error_,
*ssl_info_.cert.get()));
ssl_error_classification_->RecordUMAStatistics(overridable_);
-#if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
- ssl_error_classification_->RecordCaptivePortalUMAStatistics(overridable_);
-#endif
// Creating an interstitial without showing (e.g. from chrome://interstitials)
// it leaks memory, so don't create it here.
@@ -264,6 +261,11 @@ const void* 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
if (!callback_.is_null()) {
// The page is closed without the user having chosen what to do, default to
// deny.
« no previous file with comments | « no previous file | chrome/browser/ssl/ssl_error_classification.cc » ('j') | chrome/browser/ssl/ssl_error_classification.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698