OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_LOGIN_DETECTOR_H_ | |
6 #define CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_LOGIN_DETECTOR_H_ | |
7 #pragma once | |
8 | |
9 #include "base/basictypes.h" | |
10 #include "base/compiler_specific.h" | |
cbentzel
2012/05/30 16:26:42
Where is compiler_specific userd?
mmenke
2012/05/30 17:46:25
Removed. OVERRIDE and DISALLOW_COPY_AND_ASSIGN be
| |
11 #include "chrome/browser/captive_portal/captive_portal_service.h" | |
12 | |
13 class Profile; | |
14 | |
15 namespace captive_portal { | |
16 | |
17 // Triggers a captive portal test on navigations that may indicate a captive | |
18 // portal has been logged into. Currently only tracks if a page was opened | |
19 // at a captive portal tab's login page, and triggers checks every navigation | |
20 // until there's no longer a captive portal, relying on the | |
21 // CaptivePortalService's throttling to prevent excessive server load. | |
22 // | |
23 // TODO(mmenke): If a page has been broken by a captive portal, and it's | |
24 // successfully reloaded, trigger a captive portal check. | |
25 class CaptivePortalLoginDetector { | |
26 public: | |
27 explicit CaptivePortalLoginDetector(Profile* profile); | |
28 | |
29 virtual ~CaptivePortalLoginDetector(); | |
cbentzel
2012/05/30 16:26:42
Why does this need to be virtual?
mmenke
2012/05/30 17:46:25
Removed.
| |
30 | |
31 void OnStoppedLoading(); | |
32 void OnCaptivePortalResults(Result previous_result, Result result); | |
33 | |
34 bool is_login_tab() const { return is_login_tab_; } | |
35 void set_is_login_tab() { is_login_tab_ = true; } | |
36 | |
37 private: | |
38 Profile* profile_; | |
39 | |
40 // True if this is a login tab. Set manually, automatically cleared once | |
41 // login is detected. | |
42 bool is_login_tab_; | |
43 | |
44 DISALLOW_COPY_AND_ASSIGN(CaptivePortalLoginDetector); | |
45 }; | |
46 | |
47 } // namespace captive_portal | |
48 | |
49 #endif // CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_LOGIN_DETECTOR_H_ | |
OLD | NEW |