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 6e818321ed05711e35cac6c457925b6f03d6f7c3..e31575e348ed83da7d9e04c3b1e9269d90a6c4f8 100644 |
--- a/chrome/browser/captive_portal/captive_portal_service.cc |
+++ b/chrome/browser/captive_portal/captive_portal_service.cc |
@@ -27,24 +27,6 @@ namespace captive_portal { |
namespace { |
-// Used for histograms. |
-const char* const kCaptivePortalResultNames[] = { |
- "InternetConnected", |
- "NoResponse", |
- "BehindCaptivePortal", |
- "NumCaptivePortalResults", |
-}; |
-COMPILE_ASSERT(arraysize(kCaptivePortalResultNames) == RESULT_COUNT + 1, |
- captive_portal_result_name_count_mismatch); |
- |
-// Used for histograms. |
-std::string CaptivePortalResultToString(Result result) { |
- DCHECK_GE(result, 0); |
- DCHECK_LT(static_cast<unsigned int>(result), |
- arraysize(kCaptivePortalResultNames)); |
- return kCaptivePortalResultNames[result]; |
-} |
- |
// Records histograms relating to how often captive portal detection attempts |
// ended with |result| in a row, and for how long |result| was the last result |
// of a detection attempt. Recorded both on quit and on a new Result. |
@@ -65,7 +47,7 @@ void RecordRepeatHistograms(Result result, |
base::Histogram* result_repeated_histogram = |
base::Histogram::FactoryGet( |
"CaptivePortal.ResultRepeated." + |
- CaptivePortalResultToString(result), |
+ CaptivePortalDetector::CaptivePortalResultToString(result), |
1, // min |
100, // max |
100, // bucket_count |
@@ -79,7 +61,7 @@ void RecordRepeatHistograms(Result result, |
base::Histogram* result_duration_histogram = |
base::Histogram::FactoryTimeGet( |
"CaptivePortal.ResultDuration." + |
- CaptivePortalResultToString(result), |
+ CaptivePortalDetector::CaptivePortalResultToString(result), |
base::TimeDelta::FromSeconds(1), // min |
base::TimeDelta::FromHours(1), // max |
50, // bucket_count |