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

Unified Diff: chrome/browser/ui/webui/options/managed_user_import_handler.cc

Issue 33753002: Sooper experimental refactoring of the profile info cache. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
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 85806eb52aee1060024929d78e34beb7a4fac17e..1713b831058285440388e99871961bc16131a9d4 100644
--- a/chrome/browser/ui/webui/options/managed_user_import_handler.cc
+++ b/chrome/browser/ui/webui/options/managed_user_import_handler.cc
@@ -119,8 +119,12 @@ void ManagedUserImportHandler::SendExistingManagedUsers(
const ProfileInfoCache& cache =
g_browser_process->profile_manager()->GetProfileInfoCache();
std::set<std::string> managed_user_ids;
- for (size_t i = 0; i < cache.GetNumberOfProfiles(); ++i)
- managed_user_ids.insert(cache.GetManagedUserIdOfProfileAtIndex(i));
+
+ const std::vector<ProfileInfoEntry> entries(cache.GetProfilesSortedByName());
+ for (std::vector<ProfileInfoEntry>::const_iterator it = entries.begin();
+ it != entries.end(); ++it) {
+ managed_user_ids.insert(it->managed_user_id());
+ }
ListValue managed_users;
for (DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) {

Powered by Google App Engine
This is Rietveld 408576698