| Index: chrome/browser/captive_portal/captive_portal_service.h
|
| diff --git a/chrome/browser/captive_portal/captive_portal_service.h b/chrome/browser/captive_portal/captive_portal_service.h
|
| index 2effcaeec2b6675b7f9b24b41d9f7ec98bbe2b54..c79ea682556735dc5d1987d265ae253076d1f386 100644
|
| --- a/chrome/browser/captive_portal/captive_portal_service.h
|
| +++ b/chrome/browser/captive_portal/captive_portal_service.h
|
| @@ -11,7 +11,7 @@
|
| #include "base/threading/non_thread_safe.h"
|
| #include "base/time/time.h"
|
| #include "base/timer/timer.h"
|
| -#include "chrome/browser/captive_portal/captive_portal_detector.h"
|
| +#include "components/captive_portal/captive_portal_detector.h"
|
| #include "components/keyed_service/core/keyed_service.h"
|
| #include "net/base/backoff_entry.h"
|
| #include "url/gurl.h"
|
| @@ -39,9 +39,9 @@ class CaptivePortalService : public KeyedService, public base::NonThreadSafe {
|
| // The details sent via a NOTIFICATION_CAPTIVE_PORTAL_CHECK_RESULT.
|
| struct Results {
|
| // The result of the second most recent captive portal check.
|
| - Result previous_result;
|
| + CaptivePortalResult previous_result;
|
| // The result of the most recent captive portal check.
|
| - Result result;
|
| + CaptivePortalResult result;
|
| };
|
|
|
| explicit CaptivePortalService(Profile* profile);
|
| @@ -57,7 +57,9 @@ class CaptivePortalService : public KeyedService, public base::NonThreadSafe {
|
| const GURL& test_url() const { return test_url_; }
|
|
|
| // Result of the most recent captive portal check.
|
| - Result last_detection_result() const { return last_detection_result_; }
|
| + CaptivePortalResult last_detection_result() const {
|
| + return last_detection_result_;
|
| + }
|
|
|
| // Whether or not the CaptivePortalService is enabled. When disabled, all
|
| // checks return INTERNET_CONNECTED.
|
| @@ -118,11 +120,11 @@ class CaptivePortalService : public KeyedService, public base::NonThreadSafe {
|
|
|
| // Called when a captive portal check completes. Passes the result to all
|
| // observers.
|
| - void OnResult(Result result);
|
| + void OnResult(CaptivePortalResult result);
|
|
|
| // Updates BackoffEntry::Policy and creates a new BackoffEntry, which
|
| // resets the count used for throttling.
|
| - void ResetBackoffEntry(Result result);
|
| + void ResetBackoffEntry(CaptivePortalResult result);
|
|
|
| // Updates |enabled_| based on command line flags and Profile preferences,
|
| // and sets |state_| to STATE_NONE if it's false.
|
| @@ -169,7 +171,7 @@ class CaptivePortalService : public KeyedService, public base::NonThreadSafe {
|
| bool enabled_;
|
|
|
| // The result of the most recent captive portal check.
|
| - Result last_detection_result_;
|
| + CaptivePortalResult last_detection_result_;
|
|
|
| // Number of sequential checks with the same captive portal result.
|
| int num_checks_with_same_result_;
|
| @@ -184,8 +186,8 @@ class CaptivePortalService : public KeyedService, public base::NonThreadSafe {
|
| RecheckPolicy recheck_policy_;
|
|
|
| // Implements behavior needed by |recheck_policy_|. Whenever there's a new
|
| - // captive_portal::Result, BackoffEntry::Policy is updated and
|
| - // |backoff_entry_| is recreated. Each check that returns the same Result
|
| + // captive_portal::CaptivePortalResult, BackoffEntry::Policy is updated and
|
| + // |backoff_entry_| is recreated. Each check that returns the same result
|
| // is considered a "failure", to trigger throttling.
|
| scoped_ptr<net::BackoffEntry> backoff_entry_;
|
|
|
|
|