Commit 3ed46dac authored by Monica Basta's avatar Monica Basta Committed by Commit Bot

[ProfileMenu]: Fix unsorted profiles bug in the user menu revamp.

There is a bug in the new user menu that is the profiles in the other
people list is not sorted alphatecially by name. This CL fixes the bug
by retrieving the profile attributes entry sorted by name.

Bug: 1027809
Change-Id: I4355b35baacc2f374ab3f82e9ee5807db14b468b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940274Reviewed-by: default avatarThomas Tangl <tangltom@chromium.org>
Commit-Queue: Monica Basta <msalama@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719588}
parent 390e9382
......@@ -655,7 +655,7 @@ void ProfileMenuView::BuildProfileManagementHeading() {
void ProfileMenuView::BuildSelectableProfiles() {
auto profile_entries = g_browser_process->profile_manager()
->GetProfileAttributesStorage()
.GetAllProfilesAttributes();
.GetAllProfilesAttributesSortedByName();
for (ProfileAttributesEntry* profile_entry : profile_entries) {
// The current profile is excluded.
if (profile_entry->GetPath() == browser()->profile()->GetPath())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment