| 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);
|
|
|