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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc

Issue 2928513004: cros: Do not initialize gaia portal detector if not loading gaia (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698