Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/webui/chromeos/login/gaia_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h" |
| 6 | 6 |
| 7 #include "ash/system/devicetype_utils.h" | 7 #include "ash/system/devicetype_utils.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/guid.h" | 10 #include "base/guid.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 236 } | 236 } |
| 237 | 237 |
| 238 GaiaScreenHandler::~GaiaScreenHandler() { | 238 GaiaScreenHandler::~GaiaScreenHandler() { |
| 239 if (network_portal_detector_) | 239 if (network_portal_detector_) |
| 240 network_portal_detector_->RemoveObserver(this); | 240 network_portal_detector_->RemoveObserver(this); |
| 241 } | 241 } |
| 242 | 242 |
| 243 void GaiaScreenHandler::MaybePreloadAuthExtension() { | 243 void GaiaScreenHandler::MaybePreloadAuthExtension() { |
| 244 VLOG(1) << "MaybePreloadAuthExtension"; | 244 VLOG(1) << "MaybePreloadAuthExtension"; |
| 245 | 245 |
| 246 if (!network_portal_detector_) { | 246 if (!network_portal_detector_ && |
| 247 !user_manager::UserManager::Get()->IsUserLoggedIn()) { | |
|
xiyuan
2017/06/06 21:54:29
Maybe move ShouldLoadGaia() before this and bail o
jdufault
2017/06/06 21:58:37
Add a comment explaining why we need this special
Qiang(Joe) Xu
2017/06/06 22:51:09
Done.
Qiang(Joe) Xu
2017/06/06 22:51:09
Done.
| |
| 247 NetworkPortalDetectorImpl* detector = new NetworkPortalDetectorImpl( | 248 NetworkPortalDetectorImpl* detector = new NetworkPortalDetectorImpl( |
| 248 g_browser_process->system_request_context(), false); | 249 g_browser_process->system_request_context(), false); |
| 249 detector->set_portal_test_url(GURL(kRestrictiveProxyURL)); | 250 detector->set_portal_test_url(GURL(kRestrictiveProxyURL)); |
| 250 network_portal_detector_.reset(detector); | 251 network_portal_detector_.reset(detector); |
| 251 network_portal_detector_->AddObserver(this); | 252 network_portal_detector_->AddObserver(this); |
| 252 network_portal_detector_->Enable(true); | 253 network_portal_detector_->Enable(true); |
| 253 } | 254 } |
| 254 | 255 |
| 255 // If cookies clearing was initiated or |dns_clear_task_running_| then auth | 256 // If cookies clearing was initiated or |dns_clear_task_running_| then auth |
| 256 // extension showing has already been initiated and preloading is pointless. | 257 // extension showing has already been initiated and preloading is pointless. |
| (...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 974 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { | 975 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { |
| 975 return signin_screen_handler_->delegate_; | 976 return signin_screen_handler_->delegate_; |
| 976 } | 977 } |
| 977 | 978 |
| 978 bool GaiaScreenHandler::IsRestrictiveProxy() const { | 979 bool GaiaScreenHandler::IsRestrictiveProxy() const { |
| 979 return !disable_restrictive_proxy_check_for_test_ && | 980 return !disable_restrictive_proxy_check_for_test_ && |
| 980 !IsOnline(captive_portal_status_); | 981 !IsOnline(captive_portal_status_); |
| 981 } | 982 } |
| 982 | 983 |
| 983 } // namespace chromeos | 984 } // namespace chromeos |
| OLD | NEW |