| Index: chrome/browser/ui/webui/options/managed_user_import_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options/managed_user_import_handler.cc b/chrome/browser/ui/webui/options/managed_user_import_handler.cc
|
| index 1722b6459499fe77f6a8520bc5216f18282e281f..f86f6b9b76e4487c38bccf15df53d8ab36b5d291 100644
|
| --- a/chrome/browser/ui/webui/options/managed_user_import_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/managed_user_import_handler.cc
|
| @@ -122,9 +122,13 @@ void ManagedUserImportHandler::SendExistingManagedUsers(
|
| DCHECK(dict);
|
| const ProfileInfoCache& cache =
|
| g_browser_process->profile_manager()->GetProfileInfoCache();
|
| +
|
| + // Collect the ids of local supervised user profiles.
|
| std::set<std::string> managed_user_ids;
|
| - for (size_t i = 0; i < cache.GetNumberOfProfiles(); ++i)
|
| - managed_user_ids.insert(cache.GetManagedUserIdOfProfileAtIndex(i));
|
| + for (size_t i = 0; i < cache.GetNumberOfProfiles(); ++i) {
|
| + if (cache.ProfileIsManagedAtIndex(i))
|
| + managed_user_ids.insert(cache.GetManagedUserIdOfProfileAtIndex(i));
|
| + }
|
|
|
| base::ListValue managed_users;
|
| for (base::DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) {
|
|
|