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

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

Issue 10020051: Open a login tab on captive portal detection on SSL loads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Response to comments Created 8 years, 6 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
(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 #include "chrome/browser/captive_portal/captive_portal_login_detector.h"
6
7 #include "chrome/browser/captive_portal/captive_portal_service_factory.h"
8
9 namespace captive_portal {
10
11 CaptivePortalLoginDetector::CaptivePortalLoginDetector(
12 Profile* profile)
13 : profile_(profile),
14 is_login_tab_(false) {
15 }
16
17 CaptivePortalLoginDetector::~CaptivePortalLoginDetector() {
18 }
19
20 void CaptivePortalLoginDetector::OnStoppedLoading() {
21 if (!is_login_tab_)
22 return;
23 // The service is guaranteed to exist if |is_login_tab_| is true, since it's
24 // only set to true once a captive portal is detected.
25 CaptivePortalServiceFactory::GetForProfile(profile_)->DetectCaptivePortal();
26 }
27
28 void CaptivePortalLoginDetector::OnCaptivePortalResults(
29 Result previous_result,
30 Result result) {
31 if (result != RESULT_BEHIND_CAPTIVE_PORTAL)
32 is_login_tab_ = false;
33 }
34
35 } // namespace captive_portal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698