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

Unified Diff: chrome/browser/captive_portal/captive_portal_service.cc

Issue 211983002: Add logging for distinguishing between captive portals with HTTP and HTTPS login pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/captive_portal/captive_portal_service.cc
diff --git a/chrome/browser/captive_portal/captive_portal_service.cc b/chrome/browser/captive_portal/captive_portal_service.cc
index dc40d2a22682bf8807c9eb2e55e7f4f0b450a59b..d33dcef369968767ee6691d79d816f124df5aec0 100644
--- a/chrome/browser/captive_portal/captive_portal_service.cc
+++ b/chrome/browser/captive_portal/captive_portal_service.cc
@@ -209,9 +209,17 @@ void CaptivePortalService::OnPortalDetectionCompleted(
base::TimeTicks now = GetCurrentTimeTicks();
// Record histograms.
- UMA_HISTOGRAM_ENUMERATION("CaptivePortal.DetectResult",
- result,
- RESULT_COUNT);
+ if (!results.is_response_https || result == RESULT_INTERNET_CONNECTED) {
+ UMA_HISTOGRAM_ENUMERATION("CaptivePortal.DetectResult",
+ result,
+ RESULT_COUNT + 2);
+ } else {
+ // Record HTTPS login pages separately for RESULT_NO_RESPONSE
+ // and RESULT_BEHIND_CAPTIVE_PORTAL.
+ UMA_HISTOGRAM_ENUMERATION("CaptivePortal.DetectResult",
+ result + 2,
+ RESULT_COUNT + 2);
+ }
// If this isn't the first captive portal result, record stats.
if (!last_check_time_.is_null()) {

Powered by Google App Engine
This is Rietveld 408576698