| 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 #include "chrome/browser/captive_portal/captive_portal_login_detector.h" | 5 #include "chrome/browser/captive_portal/captive_portal_login_detector.h" |
| 6 | 6 |
| 7 #include "chrome/browser/captive_portal/captive_portal_service_factory.h" | 7 #include "chrome/browser/captive_portal/captive_portal_service_factory.h" |
| 8 | 8 |
| 9 namespace captive_portal { | 9 namespace captive_portal { |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 first_login_tab_load_ = false; | 25 first_login_tab_load_ = false; |
| 26 return; | 26 return; |
| 27 } | 27 } |
| 28 | 28 |
| 29 // The service is guaranteed to exist if |is_login_tab_| is true, since it's | 29 // The service is guaranteed to exist if |is_login_tab_| is true, since it's |
| 30 // only set to true once a captive portal is detected. | 30 // only set to true once a captive portal is detected. |
| 31 CaptivePortalServiceFactory::GetForProfile(profile_)->DetectCaptivePortal(); | 31 CaptivePortalServiceFactory::GetForProfile(profile_)->DetectCaptivePortal(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void CaptivePortalLoginDetector::OnCaptivePortalResults( | 34 void CaptivePortalLoginDetector::OnCaptivePortalResults( |
| 35 Result previous_result, | 35 CaptivePortalResult previous_result, |
| 36 Result result) { | 36 CaptivePortalResult result) { |
| 37 if (result != RESULT_BEHIND_CAPTIVE_PORTAL) | 37 if (result != RESULT_BEHIND_CAPTIVE_PORTAL) |
| 38 is_login_tab_ = false; | 38 is_login_tab_ = false; |
| 39 } | 39 } |
| 40 | 40 |
| 41 void CaptivePortalLoginDetector::SetIsLoginTab() { | 41 void CaptivePortalLoginDetector::SetIsLoginTab() { |
| 42 is_login_tab_ = true; | 42 is_login_tab_ = true; |
| 43 first_login_tab_load_ = true; | 43 first_login_tab_load_ = true; |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // namespace captive_portal | 46 } // namespace captive_portal |
| OLD | NEW |