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 ca3c7b4bb909c8303d2d383183d8169034c1f4e9..45978345b6bd12c3611b4ecdf4f458910356bd8f 100644 |
| --- a/chrome/browser/chromeos/login/user_manager_impl.cc |
| +++ b/chrome/browser/chromeos/login/user_manager_impl.cc |
| @@ -835,8 +835,8 @@ void UserManagerImpl::EnsureUsersLoaded() { |
| for (std::vector<std::string>::const_iterator it = regular_users.begin(); |
| it != regular_users.end(); ++it) { |
| User* user = NULL; |
| - if (gaia::ExtractDomainName(*it) == |
| - UserManager::kLocallyManagedUserDomain) { |
| + const std::string domain_name = gaia::ExtractDomainName(*it); |
| + if (domain_name == UserManager::kLocallyManagedUserDomain) { |
|
bartfab (slow)
2013/04/23 15:59:40
Nit: Why |domain_name| here and |domain| 50 lines
Mattias Nissler (ping if slow)
2013/04/23 18:28:10
Ha, this is an edit artifact actually :) Fixed.
|
| user = User::CreateLocallyManagedUser(*it); |
| } else { |
| user = User::CreateRegularUser(*it); |
| @@ -885,12 +885,29 @@ void UserManagerImpl::RetrieveTrustedDevicePolicies() { |
| cros_settings_->GetBoolean(kAccountsPrefEphemeralUsersEnabled, |
| &ephemeral_users_enabled_); |
| cros_settings_->GetString(kDeviceOwner, &owner_email_); |
| - const base::ListValue* public_accounts; |
| - cros_settings_->GetList(kAccountsPrefDeviceLocalAccounts, &public_accounts); |
| + const base::ListValue* device_local_accounts; |
| + base::ListValue public_accounts; |
|
Nikita (slow)
2013/04/23 17:04:50
nit: Could this be extracted to a separate method?
Mattias Nissler (ping if slow)
2013/04/23 18:28:10
Done.
|
| + if (cros_settings_->GetList(kAccountsPrefDeviceLocalAccounts, |
| + &device_local_accounts)) { |
| + for (base::ListValue::const_iterator user(device_local_accounts->begin()); |
| + user != device_local_accounts->end(); ++user) { |
| + std::string user_id; |
| + if (!(*user)->GetAsString(&user_id)) |
|
bartfab (slow)
2013/04/23 15:59:40
Nit: Add NOTREACHED()?
Mattias Nissler (ping if slow)
2013/04/23 18:28:10
Done.
|
| + continue; |
| + const std::string domain = gaia::ExtractDomainName(user_id); |
| + if (domain == kKioskAppUserDomain) { |
| + // TODO(mnissler, nkostylev, bartfab): Process Kiosk Apps within the |
| + // standard user framework. |
|
Nikita (slow)
2013/04/23 17:04:50
nit: Please file a bug.
Mattias Nissler (ping if slow)
2013/04/23 18:28:10
Done.
|
| + continue; |
| + } else { |
| + public_accounts.AppendString(user_id); |
| + } |
| + } |
| + } |
| EnsureUsersLoaded(); |
| - bool changed = UpdateAndCleanUpPublicAccounts(*public_accounts); |
| + bool changed = UpdateAndCleanUpPublicAccounts(public_accounts); |
| // If ephemeral users are enabled and we are on the login screen, take this |
| // opportunity to clean up by removing all regular users except the owner. |