Index: chrome/browser/notifications/message_center_settings_controller.cc |
diff --git a/chrome/browser/notifications/message_center_settings_controller.cc b/chrome/browser/notifications/message_center_settings_controller.cc |
index b59967c65cafd9e0ff161f2b653c6be02c8f473c..40c90881667e3a97831f72e309ffa1c9e693e292 100644 |
--- a/chrome/browser/notifications/message_center_settings_controller.cc |
+++ b/chrome/browser/notifications/message_center_settings_controller.cc |
@@ -381,16 +381,18 @@ void MessageCenterSettingsController::RebuildNotifierGroups() { |
notifier_groups_.clear(); |
current_notifier_group_ = 0; |
- const size_t count = profile_info_cache_->GetNumberOfProfiles(); |
- |
- for (size_t i = 0; i < count; ++i) { |
+ const std::vector<ProfileInfoEntry> entries( |
+ profile_info_cache_->GetProfilesSortedByName()); |
+ int index = 0; |
+ for (std::vector<ProfileInfoEntry>::const_iterator it = entries.begin(); |
+ it != entries.end(); ++it) { |
scoped_ptr<message_center::ProfileNotifierGroup> group( |
new message_center::ProfileNotifierGroup( |
- profile_info_cache_->GetAvatarIconOfProfileAtIndex(i), |
- profile_info_cache_->GetNameOfProfileAtIndex(i), |
- profile_info_cache_->GetUserNameOfProfileAtIndex(i), |
- i, |
- profile_info_cache_->GetPathOfProfileAtIndex(i))); |
+ profile_info_cache_->GetAvatarIconOfProfile(it->path()), |
+ it->GetDisplayName(), |
+ it->user_name(), |
+ index++, |
+ it->path())); |
if (group->profile() == NULL) |
continue; |