Chromium Code Reviews| 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 41c4ceabc0317eec34af405a1426f0e21b6dfd41..cfa25fc4b796dd24e69c00c2edaa4085df24ffc5 100644 |
| --- a/chrome/browser/captive_portal/captive_portal_service.cc |
| +++ b/chrome/browser/captive_portal/captive_portal_service.cc |
| @@ -13,6 +13,7 @@ |
| #include "chrome/browser/chrome_notification_types.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/common/pref_names.h" |
| +#include "components/captive_portal/captive_portal_types.h" |
| #include "content/public/browser/notification_service.h" |
| #if defined(OS_MACOSX) |
| @@ -53,7 +54,7 @@ enum CaptivePortalDetectionResult { |
| // |result_duration| is the time between when a captive portal check first |
| // returned |result| and when a check returned a different result, or when the |
| // CaptivePortalService was shut down. |
| -void RecordRepeatHistograms(Result result, |
| +void RecordRepeatHistograms(CaptivePortalResult result, |
| int repeat_count, |
| base::TimeDelta result_duration) { |
| // Histogram macros can't be used with variable names, since they cache |
| @@ -63,7 +64,7 @@ void RecordRepeatHistograms(Result result, |
| base::HistogramBase* result_repeated_histogram = |
| base::Histogram::FactoryGet( |
| "CaptivePortal.ResultRepeated." + |
| - CaptivePortalDetector::CaptivePortalResultToString(result), |
| + captive_portal::CaptivePortalResultToString(result), |
|
ygorshenin1
2014/04/21 13:36:45
Why do you need to explicitly specify namespace he
stevenjb
2014/04/21 16:42:27
Done.
|
| 1, // min |
| 100, // max |
| 100, // bucket_count |
| @@ -77,7 +78,7 @@ void RecordRepeatHistograms(Result result, |
| base::HistogramBase* result_duration_histogram = |
| base::Histogram::FactoryTimeGet( |
| "CaptivePortal.ResultDuration." + |
| - CaptivePortalDetector::CaptivePortalResultToString(result), |
| + captive_portal::CaptivePortalResultToString(result), |
| base::TimeDelta::FromSeconds(1), // min |
| base::TimeDelta::FromHours(1), // max |
| 50, // bucket_count |
| @@ -240,7 +241,7 @@ void CaptivePortalService::OnPortalDetectionCompleted( |
| DCHECK(!TimerRunning()); |
| DCHECK(enabled_); |
| - Result result = results.result; |
| + CaptivePortalResult result = results.result; |
| const base::TimeDelta& retry_after_delta = results.retry_after_delta; |
| base::TimeTicks now = GetCurrentTimeTicks(); |
| @@ -302,7 +303,7 @@ void CaptivePortalService::Shutdown() { |
| } |
| } |
| -void CaptivePortalService::OnResult(Result result) { |
| +void CaptivePortalService::OnResult(CaptivePortalResult result) { |
| DCHECK_EQ(STATE_CHECKING_FOR_PORTAL, state_); |
| state_ = STATE_IDLE; |
| @@ -317,7 +318,7 @@ void CaptivePortalService::OnResult(Result result) { |
| content::Details<Results>(&results)); |
| } |
| -void CaptivePortalService::ResetBackoffEntry(Result result) { |
| +void CaptivePortalService::ResetBackoffEntry(CaptivePortalResult result) { |
| if (!enabled_ || result == RESULT_BEHIND_CAPTIVE_PORTAL) { |
| // Use the shorter time when the captive portal service is not enabled, or |
| // behind a captive portal. |