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

Unified Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 1028603003: Fast user switcher: Distinguish supervised users from child accounts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DCHECK Created 5 years, 9 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 | « chrome/browser/ui/cocoa/profiles/profile_menu_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/profiles/profile_chooser_view.cc
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
index e3499738f3dd168dac64c051b09bc521885adba8..4d9e45f97e892de460bc9e6361b991ee98910aa6 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -1279,9 +1279,7 @@ views::View* ProfileChooserView::CreateOtherProfilesView(
views::View* view = new views::View();
views::GridLayout* layout = CreateSingleColumnLayout(view, kFixedMenuWidth);
- int num_avatars_to_show = avatars_to_show.size();
- for (int i = 0; i < num_avatars_to_show; ++i) {
- const size_t index = avatars_to_show[i];
+ for (size_t index : avatars_to_show) {
const AvatarMenu::Item& item = avatar_menu_->GetItemAt(index);
const int kSmallImageSide = 32;
@@ -1293,9 +1291,11 @@ views::View* ProfileChooserView::CreateOtherProfilesView(
item.profile_path, &item_icon, &is_rectangle);
base::string16 title = item.name;
- if (item.supervised) {
+ if (item.legacy_supervised) {
title = l10n_util::GetStringFUTF16(IDS_SUPERVISED_USER_NEW_AVATAR_LABEL,
title);
+ } else if (item.child_account) {
+ title = l10n_util::GetStringFUTF16(IDS_CHILD_AVATAR_LABEL, title);
}
gfx::Image image = profiles::GetSizedAvatarIcon(
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/profile_menu_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698