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

Unified 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: comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
index 67f3955d0cff065655c886d05f624affa67a4076..a1113adb66af2e8f07939fb1f69952d2c5ebe964 100644
--- a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
@@ -241,6 +241,12 @@ GaiaScreenHandler::~GaiaScreenHandler() {
}
void GaiaScreenHandler::MaybePreloadAuthExtension() {
+ // We shall not have network portal detector initialized, which unnecessarily
+ // polls captive portal checking URL if we don't need to load gaia. See
+ // go/bad-portal for more context.
+ if (!signin_screen_handler_->ShouldLoadGaia())
+ return;
+
VLOG(1) << "MaybePreloadAuthExtension";
if (!network_portal_detector_) {
@@ -254,8 +260,7 @@ void GaiaScreenHandler::MaybePreloadAuthExtension() {
// If cookies clearing was initiated or |dns_clear_task_running_| then auth
// extension showing has already been initiated and preloading is pointless.
- if (signin_screen_handler_->ShouldLoadGaia() && !gaia_silent_load_ &&
- !cookies_cleared_ && !dns_clear_task_running_ &&
+ if (!gaia_silent_load_ && !cookies_cleared_ && !dns_clear_task_running_ &&
network_state_informer_->state() == NetworkStateInformer::ONLINE) {
gaia_silent_load_ = true;
gaia_silent_load_network_ = network_state_informer_->network_path();
« 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