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

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: Added check for Oauth data consistency. 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 2d92d55ba0fd86b491657716f34302b7c3d477ad..17a48fdccde74bf21dceec294eb506df4f8b3fd3 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) {
@@ -754,18 +755,18 @@ 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);
StopPublicSessionAutoLoginTimer();
- const bool has_cookies =
- 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();
+ const bool has_cookies = auth_mode_ == LoginPerformer::AUTH_MODE_EXTENSION &&
+ user_context.GetAuthCode().empty();
// LoginPerformer instance will delete itself once online auth result is OK.
// In case of failure it'll bring up ScreenLock and ask for
@@ -939,6 +940,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