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

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

Issue 2886933003: Use stricter type checking in UMA_HISTOGRAM_ENUMERATION (Closed)
Patch Set: simplify type checking Created 3 years, 5 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 4b6d6368074c8e5a132f79ed40b51c6ff57519f9..561695fe0482f830e7c6d3ebac4a168a64c6833e 100644
--- a/chrome/browser/captive_portal/captive_portal_service.cc
+++ b/chrome/browser/captive_portal/captive_portal_service.cc
@@ -92,7 +92,7 @@ void RecordRepeatHistograms(CaptivePortalResult result,
result_duration_histogram->AddTime(result_duration);
}
-int GetHistogramEntryForDetectionResult(
+CaptivePortalDetectionResult GetHistogramEntryForDetectionResult(
const captive_portal::CaptivePortalDetector::Results& results) {
bool is_https = results.landing_url.SchemeIs("https");
bool is_ip = results.landing_url.HostIsIPAddress();
@@ -119,7 +119,7 @@ int GetHistogramEntryForDetectionResult(
DETECTION_RESULT_BEHIND_CAPTIVE_PORTAL;
default:
NOTREACHED();
- return -1;
+ return DETECTION_RESULT_COUNT;
}
}
« no previous file with comments | « chrome/browser/android/metrics/launch_metrics.cc ('k') | chrome/browser/chromeos/app_mode/kiosk_app_launch_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698