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

Unified Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 322533002: Restart Chrome on ChromeOS as early as possible to speed up restart. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win build. Created 6 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
Index: chrome/browser/chromeos/login/existing_user_controller.cc
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
index e6b1dc1f0e9cd62f8a8515281056c3a4c9fb5d4b..75ff3f3d392cd74e846024576b595bf287f2bc2f 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -131,6 +131,7 @@ ExistingUserController::ExistingUserController(LoginDisplayHost* host)
offline_failed_(false),
is_login_in_progress_(false),
password_changed_(false),
+ auth_mode_(LoginPerformer::AUTH_MODE_EXTENSION),
do_auto_enrollment_(false),
signin_screen_ready_(false),
network_state_helper_(new login::NetworkStateHelper) {
@@ -770,6 +771,11 @@ void ExistingUserController::OnLoginSuccess(const UserContext& user_context) {
offline_failed_ = false;
login_display_->set_signin_completed(true);
+ // Login performer will be gone so cache this value to use
+ // once profile is loaded.
+ password_changed_ = login_performer_->password_changed();
+ auth_mode_ = login_performer_->auth_mode();
+
UserManager::Get()->GetUserFlow(user_context.GetUserID())->
HandleLoginSuccess(user_context);
@@ -779,10 +785,6 @@ void ExistingUserController::OnLoginSuccess(const UserContext& user_context) {
login_performer_->auth_mode() == LoginPerformer::AUTH_MODE_EXTENSION &&
user_context.GetAuthCode().empty();
- // Login performer will be gone so cache this value to use
- // once profile is loaded.
- password_changed_ = login_performer_->password_changed();
-
// LoginPerformer instance will delete itself once online auth result is OK.
// In case of failure it'll bring up ScreenLock and ask for
// correct password/display error message.
@@ -955,6 +957,20 @@ void ExistingUserController::ActivateWizard(const std::string& screen_name) {
host_->StartWizard(screen_name, params.Pass());
}
+LoginPerformer::AuthorizationMode ExistingUserController::auth_mode() const {
+ if (login_performer_)
+ return login_performer_->auth_mode();
+
+ return auth_mode_;
+}
+
+bool ExistingUserController::password_changed() const {
+ if (login_performer_)
+ return login_performer_->password_changed();
+
+ return password_changed_;
+}
+
void ExistingUserController::ConfigurePublicSessionAutoLogin() {
std::string auto_login_account_id;
cros_settings_->GetString(kAccountsPrefDeviceLocalAccountAutoLoginId,

Powered by Google App Engine
This is Rietveld 408576698