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

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: Record the landing url for captive portal probe instead of just the https status 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..b9637d9659f6e47d0f280f9b827dcfd226bb7823 100644
--- a/chrome/browser/captive_portal/captive_portal_service.cc
+++ b/chrome/browser/captive_portal/captive_portal_service.cc
@@ -209,9 +209,18 @@ void CaptivePortalService::OnPortalDetectionCompleted(
base::TimeTicks now = GetCurrentTimeTicks();
// Record histograms.
- UMA_HISTOGRAM_ENUMERATION("CaptivePortal.DetectResult",
- result,
- RESULT_COUNT);
+ if (!results.landing_url.SchemeIs("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);
mmenke 2014/03/26 17:23:21 The +2 strikes me as fragile. If this histogram i
meacer 2014/03/26 17:59:32 I guess we can keep it for some time, so I extract
+ }
// 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