Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: chrome/browser/captive_portal/captive_portal_login_detector.cc

Issue 242483003: Move CaptivePortalDetector to src/components/captive_portal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move CaptivePortalDetector to a component Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698