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

Unified Diff: chrome/browser/automation/testing_automation_provider.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
« no previous file with comments | « no previous file | chrome/browser/background/background_mode_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index bd8a6068a497fcea0ffd29e60606302073b3f884..df66076862b88dea13d7d01186fc08d31425abcf 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -1055,12 +1055,14 @@ void TestingAutomationProvider::GetMultiProfileInfo(
return_value->SetBoolean("enabled", profiles::IsMultipleProfilesEnabled());
ListValue* profiles = new ListValue;
- for (size_t index = 0; index < profile_info_cache.GetNumberOfProfiles();
- ++index) {
+
+ const std::vector<ProfileInfoEntry> entries(
+ profile_info_cache.GetProfilesSortedByName());
+ for (std::vector<ProfileInfoEntry>::const_iterator it = entries.begin();
+ it != entries.end(); ++it) {
DictionaryValue* item = new DictionaryValue;
- item->SetString("name", profile_info_cache.GetNameOfProfileAtIndex(index));
- item->SetString("path",
- profile_info_cache.GetPathOfProfileAtIndex(index).value());
+ item->SetString("name", it->GetDisplayName());
+ item->SetString("path", it->path().value());
profiles->Append(item);
}
return_value->Set("profiles", profiles);
« no previous file with comments | « no previous file | chrome/browser/background/background_mode_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698