| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_SERVICE_H_ |
| 6 #define CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_SERVICE_H_ | 6 #define CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_SERVICE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/prefs/pref_member.h" | 10 #include "base/prefs/pref_member.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 // Initiates a captive portal check, without any throttling. If the service | 108 // Initiates a captive portal check, without any throttling. If the service |
| 109 // is disabled, just acts like there's an Internet connection. | 109 // is disabled, just acts like there's an Internet connection. |
| 110 void DetectCaptivePortalInternal(); | 110 void DetectCaptivePortalInternal(); |
| 111 | 111 |
| 112 // Called by CaptivePortalDetector when detection completes. | 112 // Called by CaptivePortalDetector when detection completes. |
| 113 void OnPortalDetectionCompleted( | 113 void OnPortalDetectionCompleted( |
| 114 const captive_portal::CaptivePortalDetector::Results& results); | 114 const captive_portal::CaptivePortalDetector::Results& results); |
| 115 | 115 |
| 116 // KeyedService: | 116 // KeyedService: |
| 117 virtual void Shutdown() OVERRIDE; | 117 virtual void Shutdown() override; |
| 118 | 118 |
| 119 // Called when a captive portal check completes. Passes the result to all | 119 // Called when a captive portal check completes. Passes the result to all |
| 120 // observers. | 120 // observers. |
| 121 void OnResult(captive_portal::CaptivePortalResult result); | 121 void OnResult(captive_portal::CaptivePortalResult result); |
| 122 | 122 |
| 123 // Updates BackoffEntry::Policy and creates a new BackoffEntry, which | 123 // Updates BackoffEntry::Policy and creates a new BackoffEntry, which |
| 124 // resets the count used for throttling. | 124 // resets the count used for throttling. |
| 125 void ResetBackoffEntry(captive_portal::CaptivePortalResult result); | 125 void ResetBackoffEntry(captive_portal::CaptivePortalResult result); |
| 126 | 126 |
| 127 // Updates |enabled_| based on command line flags and Profile preferences, | 127 // Updates |enabled_| based on command line flags and Profile preferences, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 201 |
| 202 static TestingState testing_state_; | 202 static TestingState testing_state_; |
| 203 | 203 |
| 204 // Test time ticks used by unit tests. | 204 // Test time ticks used by unit tests. |
| 205 base::TimeTicks time_ticks_for_testing_; | 205 base::TimeTicks time_ticks_for_testing_; |
| 206 | 206 |
| 207 DISALLOW_COPY_AND_ASSIGN(CaptivePortalService); | 207 DISALLOW_COPY_AND_ASSIGN(CaptivePortalService); |
| 208 }; | 208 }; |
| 209 | 209 |
| 210 #endif // CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_SERVICE_H_ | 210 #endif // CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_SERVICE_H_ |
| OLD | NEW |