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

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

Issue 1018003002: Fast user switcher: Add "(Supervised)" label for supervised users (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | 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 7f7b143d40bbc2320a8cf6fca4039eb053519fbf..e3499738f3dd168dac64c051b09bc521885adba8 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -1292,12 +1292,18 @@ views::View* ProfileChooserView::CreateOtherProfilesView(
AvatarMenu::GetImageForMenuButton(
item.profile_path, &item_icon, &is_rectangle);
+ base::string16 title = item.name;
+ if (item.supervised) {
+ title = l10n_util::GetStringFUTF16(IDS_SUPERVISED_USER_NEW_AVATAR_LABEL,
msw 2015/03/18 17:15:03 nit q: should this be truncated, like in GetAvatar
Marc Treib 2015/03/18 18:12:02 No, I don't think we explicitly need to truncate h
+ title);
+ }
+
gfx::Image image = profiles::GetSizedAvatarIcon(
item_icon, true, kSmallImageSide, kSmallImageSide);
views::LabelButton* button = new BackgroundColorHoverButton(
this,
- item.name,
+ title,
*image.ToImageSkia());
open_other_profile_indexes_map_[button] = index;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698