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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/guid.h" | 8 #include "base/guid.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
423 AddCallback("usingSAMLAPI", &GaiaScreenHandler::HandleUsingSAMLAPI); | 423 AddCallback("usingSAMLAPI", &GaiaScreenHandler::HandleUsingSAMLAPI); |
424 AddCallback("scrapedPasswordCount", | 424 AddCallback("scrapedPasswordCount", |
425 &GaiaScreenHandler::HandleScrapedPasswordCount); | 425 &GaiaScreenHandler::HandleScrapedPasswordCount); |
426 AddCallback("scrapedPasswordVerificationFailed", | 426 AddCallback("scrapedPasswordVerificationFailed", |
427 &GaiaScreenHandler::HandleScrapedPasswordVerificationFailed); | 427 &GaiaScreenHandler::HandleScrapedPasswordVerificationFailed); |
428 AddCallback("loginWebuiReady", &GaiaScreenHandler::HandleGaiaUIReady); | 428 AddCallback("loginWebuiReady", &GaiaScreenHandler::HandleGaiaUIReady); |
429 AddCallback("toggleWebviewSignin", | 429 AddCallback("toggleWebviewSignin", |
430 &GaiaScreenHandler::HandleToggleWebviewSignin); | 430 &GaiaScreenHandler::HandleToggleWebviewSignin); |
431 AddCallback("toggleEasyBootstrap", | 431 AddCallback("toggleEasyBootstrap", |
432 &GaiaScreenHandler::HandleToggleEasyBootstrap); | 432 &GaiaScreenHandler::HandleToggleEasyBootstrap); |
433 AddCallback("identifierEntered", &GaiaScreenHandler::HandleIdentifierEntered); | |
434 } | |
435 | |
436 void GaiaScreenHandler::HandleIdentifierEntered( | |
437 const std::string& account_identifier) { | |
438 if (!Delegate()->IsUserWhitelisted(account_identifier)) | |
439 ShowWhitelistCheckFailedError() | |
Denis Kuznetsov (DE-MUC)
2015/06/25 19:21:11
";" is missing
Alexander Alekseev
2015/07/11 01:02:05
Done.
| |
433 } | 440 } |
434 | 441 |
435 void GaiaScreenHandler::HandleFrameLoadingCompleted(int status) { | 442 void GaiaScreenHandler::HandleFrameLoadingCompleted(int status) { |
436 const net::Error frame_error = static_cast<net::Error>(-status); | 443 const net::Error frame_error = static_cast<net::Error>(-status); |
437 if (frame_error == net::ERR_ABORTED) { | 444 if (frame_error == net::ERR_ABORTED) { |
438 LOG(WARNING) << "Ignoring Gaia frame error: " << frame_error; | 445 LOG(WARNING) << "Ignoring Gaia frame error: " << frame_error; |
439 return; | 446 return; |
440 } | 447 } |
441 frame_error_ = frame_error; | 448 frame_error_ = frame_error; |
442 if (frame_error == net::OK) { | 449 if (frame_error == net::OK) { |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
945 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { | 952 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { |
946 DCHECK(signin_screen_handler_); | 953 DCHECK(signin_screen_handler_); |
947 return signin_screen_handler_->delegate_; | 954 return signin_screen_handler_->delegate_; |
948 } | 955 } |
949 | 956 |
950 void GaiaScreenHandler::SetSigninScreenHandler(SigninScreenHandler* handler) { | 957 void GaiaScreenHandler::SetSigninScreenHandler(SigninScreenHandler* handler) { |
951 signin_screen_handler_ = handler; | 958 signin_screen_handler_ = handler; |
952 } | 959 } |
953 | 960 |
954 } // namespace chromeos | 961 } // namespace chromeos |
OLD | NEW |