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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 318853004: Introduce SessionManager that will contain code to start user session on Chrome OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromeos/login/existing_user_controller.h" 5 #include "chrome/browser/chromeos/login/existing_user_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 password_changed_ = login_performer_->password_changed(); 768 password_changed_ = login_performer_->password_changed();
769 769
770 // LoginPerformer instance will delete itself once online auth result is OK. 770 // LoginPerformer instance will delete itself once online auth result is OK.
771 // In case of failure it'll bring up ScreenLock and ask for 771 // In case of failure it'll bring up ScreenLock and ask for
772 // correct password/display error message. 772 // correct password/display error message.
773 // Even in case when following online,offline protocol and returning 773 // Even in case when following online,offline protocol and returning
774 // requests_pending = false, let LoginPerformer delete itself. 774 // requests_pending = false, let LoginPerformer delete itself.
775 login_performer_->set_delegate(NULL); 775 login_performer_->set_delegate(NULL);
776 ignore_result(login_performer_.release()); 776 ignore_result(login_performer_.release());
777 777
778 // Update user's displayed email.
779 if (!display_email_.empty()) {
780 UserManager::Get()->SaveUserDisplayEmail(user_context.GetUserID(),
781 display_email_);
782 display_email_.clear();
783 }
784
778 // Will call OnProfilePrepared() in the end. 785 // Will call OnProfilePrepared() in the end.
779 LoginUtils::Get()->PrepareProfile(user_context, 786 LoginUtils::Get()->PrepareProfile(user_context,
780 display_email_,
781 has_cookies, 787 has_cookies,
782 false, // Start session for user. 788 false, // Start session for user.
783 this); 789 this);
784
785 display_email_.clear();
786 } 790 }
787 791
788 void ExistingUserController::OnProfilePrepared(Profile* profile) { 792 void ExistingUserController::OnProfilePrepared(Profile* profile) {
789 // Reenable clicking on other windows and status area. 793 // Reenable clicking on other windows and status area.
790 login_display_->SetUIEnabled(true); 794 login_display_->SetUIEnabled(true);
791 795
792 UserManager* user_manager = UserManager::Get(); 796 UserManager* user_manager = UserManager::Get();
793 if (user_manager->IsCurrentUserNew() && 797 if (user_manager->IsCurrentUserNew() &&
794 user_manager->IsLoggedInAsLocallyManagedUser()) { 798 user_manager->IsLoggedInAsLocallyManagedUser()) {
795 // Supervised users should launch into empty desktop on first run. 799 // Supervised users should launch into empty desktop on first run.
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 } 1117 }
1114 1118
1115 void ExistingUserController::SendAccessibilityAlert( 1119 void ExistingUserController::SendAccessibilityAlert(
1116 const std::string& alert_text) { 1120 const std::string& alert_text) {
1117 AccessibilityAlertInfo event(ProfileHelper::GetSigninProfile(), alert_text); 1121 AccessibilityAlertInfo event(ProfileHelper::GetSigninProfile(), alert_text);
1118 SendControlAccessibilityNotification( 1122 SendControlAccessibilityNotification(
1119 ui::AX_EVENT_VALUE_CHANGED, &event); 1123 ui::AX_EVENT_VALUE_CHANGED, &event);
1120 } 1124 }
1121 1125
1122 } // namespace chromeos 1126 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698