Chromium Code Reviews| Index: chrome/browser/chromeos/login/user_manager_impl.cc |
| diff --git a/chrome/browser/chromeos/login/user_manager_impl.cc b/chrome/browser/chromeos/login/user_manager_impl.cc |
| index a71bdb192754b208f81bc74ccffc4abfc34a37b2..f286ba04e811743f6f33623686a211344283f735 100644 |
| --- a/chrome/browser/chromeos/login/user_manager_impl.cc |
| +++ b/chrome/browser/chromeos/login/user_manager_impl.cc |
| @@ -1170,10 +1170,21 @@ void UserManagerImpl::EnsureUsersLoaded() { |
| const base::DictionaryValue* prefs_display_emails = |
| local_state->GetDictionary(kUserDisplayEmail); |
| + // Load public accounts first. |
|
bartfab (slow)
2014/02/19 14:24:22
Nit: We call them "public sessions" now. Could you
Nikita (slow)
2014/02/19 14:34:59
Done.
|
| + std::vector<std::string> public_accounts; |
| + std::set<std::string> public_accounts_set; |
| + ParseUserList(*prefs_public_accounts, std::set<std::string>(), |
| + &public_accounts, &public_accounts_set); |
| + for (std::vector<std::string>::const_iterator it = public_accounts.begin(); |
| + it != public_accounts.end(); ++it) { |
| + users_.push_back(User::CreatePublicAccountUser(*it)); |
| + UpdatePublicAccountDisplayName(*it); |
| + } |
| + |
| // Load regular users and locally managed users. |
| std::vector<std::string> regular_users; |
| std::set<std::string> regular_users_set; |
| - ParseUserList(*prefs_regular_users, std::set<std::string>(), |
| + ParseUserList(*prefs_regular_users, public_accounts_set, |
| ®ular_users, ®ular_users_set); |
| for (std::vector<std::string>::const_iterator it = regular_users.begin(); |
| it != regular_users.end(); ++it) { |
| @@ -1205,16 +1216,6 @@ void UserManagerImpl::EnsureUsersLoaded() { |
| } |
| } |
| - // Load public accounts. |
| - std::vector<std::string> public_accounts; |
| - std::set<std::string> public_accounts_set; |
| - ParseUserList(*prefs_public_accounts, regular_users_set, |
| - &public_accounts, &public_accounts_set); |
| - for (std::vector<std::string>::const_iterator it = public_accounts.begin(); |
| - it != public_accounts.end(); ++it) { |
| - users_.push_back(User::CreatePublicAccountUser(*it)); |
| - UpdatePublicAccountDisplayName(*it); |
| - } |
| user_loading_stage_ = STAGE_LOADED; |
| for (UserList::iterator ui = users_.begin(), ue = users_.end(); |