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

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

Issue 328383003: Revert of 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: 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
785 // Will call OnProfilePrepared() in the end. 778 // Will call OnProfilePrepared() in the end.
786 LoginUtils::Get()->PrepareProfile(user_context, 779 LoginUtils::Get()->PrepareProfile(user_context,
780 display_email_,
787 has_cookies, 781 has_cookies,
788 false, // Start session for user. 782 false, // Start session for user.
789 this); 783 this);
784
785 display_email_.clear();
790 } 786 }
791 787
792 void ExistingUserController::OnProfilePrepared(Profile* profile) { 788 void ExistingUserController::OnProfilePrepared(Profile* profile) {
793 // Reenable clicking on other windows and status area. 789 // Reenable clicking on other windows and status area.
794 login_display_->SetUIEnabled(true); 790 login_display_->SetUIEnabled(true);
795 791
796 UserManager* user_manager = UserManager::Get(); 792 UserManager* user_manager = UserManager::Get();
797 if (user_manager->IsCurrentUserNew() && 793 if (user_manager->IsCurrentUserNew() &&
798 user_manager->IsLoggedInAsLocallyManagedUser()) { 794 user_manager->IsLoggedInAsLocallyManagedUser()) {
799 // Supervised users should launch into empty desktop on first run. 795 // Supervised users should launch into empty desktop on first run.
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 } 1113 }
1118 1114
1119 void ExistingUserController::SendAccessibilityAlert( 1115 void ExistingUserController::SendAccessibilityAlert(
1120 const std::string& alert_text) { 1116 const std::string& alert_text) {
1121 AccessibilityAlertInfo event(ProfileHelper::GetSigninProfile(), alert_text); 1117 AccessibilityAlertInfo event(ProfileHelper::GetSigninProfile(), alert_text);
1122 SendControlAccessibilityNotification( 1118 SendControlAccessibilityNotification(
1123 ui::AX_EVENT_VALUE_CHANGED, &event); 1119 ui::AX_EVENT_VALUE_CHANGED, &event);
1124 } 1120 }
1125 1121
1126 } // namespace chromeos 1122 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698