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

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

Issue 1494153002: This CL replaces e-mail with AccountId in easy signin code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bugfix in original easy unlock code' Created 5 years 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
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/chromeos/devicetype_utils.h" 7 #include "ash/system/chromeos/devicetype_utils.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 captive_portal_status_ = state.status; 361 captive_portal_status_ = state.status;
362 if (offline_login_is_active() || 362 if (offline_login_is_active() ||
363 IsOnline(captive_portal_status_) == IsOnline(previous_status) || 363 IsOnline(captive_portal_status_) == IsOnline(previous_status) ||
364 disable_restrictive_proxy_check_for_test_ || 364 disable_restrictive_proxy_check_for_test_ ||
365 GetCurrentScreen() != OobeUI::SCREEN_GAIA_SIGNIN) 365 GetCurrentScreen() != OobeUI::SCREEN_GAIA_SIGNIN)
366 return; 366 return;
367 367
368 LoadAuthExtension(true /* force */, false /* offline */); 368 LoadAuthExtension(true /* force */, false /* offline */);
369 } 369 }
370 370
371 void GaiaScreenHandler::HandleIdentifierEntered( 371 void GaiaScreenHandler::HandleIdentifierEntered(const std::string& user_email) {
372 const std::string& account_identifier) { 372 if (!Delegate()->IsUserWhitelisted(
373 if (!Delegate()->IsUserWhitelisted(account_identifier)) 373 user_manager::UserManager::Get()->GetKnownUserAccountId(
374 user_email, std::string() /* gaia_id */)))
374 ShowWhitelistCheckFailedError(); 375 ShowWhitelistCheckFailedError();
375 } 376 }
376 377
377 void GaiaScreenHandler::HandleWebviewLoadAborted( 378 void GaiaScreenHandler::HandleWebviewLoadAborted(
378 const std::string& error_reason_str) { 379 const std::string& error_reason_str) {
379 // TODO(nkostylev): Switch to int code once webview supports that. 380 // TODO(nkostylev): Switch to int code once webview supports that.
380 // http://crbug.com/470483 381 // http://crbug.com/470483
381 if (error_reason_str == "ERR_ABORTED") { 382 if (error_reason_str == "ERR_ABORTED") {
382 LOG(WARNING) << "Ignoring Gaia webview error: " << error_reason_str; 383 LOG(WARNING) << "Ignoring Gaia webview error: " << error_reason_str;
383 return; 384 return;
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 bool GaiaScreenHandler::IsRestrictiveProxy() const { 797 bool GaiaScreenHandler::IsRestrictiveProxy() const {
797 return !disable_restrictive_proxy_check_for_test_ && 798 return !disable_restrictive_proxy_check_for_test_ &&
798 !IsOnline(captive_portal_status_); 799 !IsOnline(captive_portal_status_);
799 } 800 }
800 801
801 void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() { 802 void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() {
802 disable_restrictive_proxy_check_for_test_ = true; 803 disable_restrictive_proxy_check_for_test_ = true;
803 } 804 }
804 805
805 } // namespace chromeos 806 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698