OLD | NEW |
---|---|
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 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
853 user_context.GetAuthCode().empty(); | 853 user_context.GetAuthCode().empty(); |
854 | 854 |
855 // LoginPerformer instance will delete itself once online auth result is OK. | 855 // LoginPerformer instance will delete itself once online auth result is OK. |
856 // In case of failure it'll bring up ScreenLock and ask for | 856 // In case of failure it'll bring up ScreenLock and ask for |
857 // correct password/display error message. | 857 // correct password/display error message. |
858 // Even in case when following online,offline protocol and returning | 858 // Even in case when following online,offline protocol and returning |
859 // requests_pending = false, let LoginPerformer delete itself. | 859 // requests_pending = false, let LoginPerformer delete itself. |
860 login_performer_->set_delegate(NULL); | 860 login_performer_->set_delegate(NULL); |
861 ignore_result(login_performer_.release()); | 861 ignore_result(login_performer_.release()); |
862 | 862 |
863 // Will call OnProfilePrepared() in the end. | |
864 LoginUtils::Get()->PrepareProfile(user_context, | |
865 has_auth_cookies, | |
866 false, // Start session for user. | |
867 this); | |
868 | |
863 // Update user's displayed email. | 869 // Update user's displayed email. |
864 if (!display_email_.empty()) { | 870 if (!display_email_.empty()) { |
Roman Sorokin (ftl)
2014/09/05 12:10:35
SaveUserDisplayEmail does nothing cause cannot fin
|
Roman Sorokin (ftl)
2014/09/05 12:10:35
I believe this is an ugly solution, but don't know
Nikita (slow)
2014/09/08 09:33:20
I think this is the right place to do this. I've i
|
865 user_manager::UserManager::Get()->SaveUserDisplayEmail( | 871 user_manager::UserManager::Get()->SaveUserDisplayEmail( |
866 user_context.GetUserID(), display_email_); | 872 user_context.GetUserID(), display_email_); |
867 display_email_.clear(); | 873 display_email_.clear(); |
868 } | 874 } |
869 | |
870 // Will call OnProfilePrepared() in the end. | |
871 LoginUtils::Get()->PrepareProfile(user_context, | |
872 has_auth_cookies, | |
873 false, // Start session for user. | |
874 this); | |
875 } | 875 } |
876 | 876 |
877 void ExistingUserController::OnProfilePrepared(Profile* profile) { | 877 void ExistingUserController::OnProfilePrepared(Profile* profile) { |
878 // Reenable clicking on other windows and status area. | 878 // Reenable clicking on other windows and status area. |
879 login_display_->SetUIEnabled(true); | 879 login_display_->SetUIEnabled(true); |
880 | 880 |
881 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); | 881 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); |
882 if (user_manager->IsCurrentUserNew() && | 882 if (user_manager->IsCurrentUserNew() && |
883 user_manager->IsLoggedInAsSupervisedUser()) { | 883 user_manager->IsLoggedInAsSupervisedUser()) { |
884 // Supervised users should launch into empty desktop on first run. | 884 // Supervised users should launch into empty desktop on first run. |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1254 // Only one instance of LoginPerformer should exist at a time. | 1254 // Only one instance of LoginPerformer should exist at a time. |
1255 login_performer_.reset(NULL); | 1255 login_performer_.reset(NULL); |
1256 login_performer_.reset(new LoginPerformer(this)); | 1256 login_performer_.reset(new LoginPerformer(this)); |
1257 is_login_in_progress_ = true; | 1257 is_login_in_progress_ = true; |
1258 login_performer_->LoginAsPublicSession(user_context); | 1258 login_performer_->LoginAsPublicSession(user_context); |
1259 SendAccessibilityAlert( | 1259 SendAccessibilityAlert( |
1260 l10n_util::GetStringUTF8(IDS_CHROMEOS_ACC_LOGIN_SIGNIN_PUBLIC_ACCOUNT)); | 1260 l10n_util::GetStringUTF8(IDS_CHROMEOS_ACC_LOGIN_SIGNIN_PUBLIC_ACCOUNT)); |
1261 } | 1261 } |
1262 | 1262 |
1263 } // namespace chromeos | 1263 } // namespace chromeos |
OLD | NEW |