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

Unified Diff: chrome/browser/profiles/avatar_menu_model.cc

Issue 9489011: Elide long emails in the wrench and profile menus. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed lint Created 8 years, 10 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
Index: chrome/browser/profiles/avatar_menu_model.cc
diff --git a/chrome/browser/profiles/avatar_menu_model.cc b/chrome/browser/profiles/avatar_menu_model.cc
index 7d8b6bc9d05cf7e7fdb59360a51ae982b33cd9be..3a9f998b8fa7b5ad0d59ea878a7271c59160fb24 100644
--- a/chrome/browser/profiles/avatar_menu_model.cc
+++ b/chrome/browser/profiles/avatar_menu_model.cc
@@ -23,6 +23,7 @@
#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/text/text_elider.h"
using content::BrowserThread;
@@ -161,6 +162,9 @@ void AvatarMenuModel::RebuildMenu() {
if (item->sync_state.empty()) {
item->sync_state = l10n_util::GetStringUTF16(
IDS_PROFILES_LOCAL_PROFILE_STATE);
+ } else {
+ item->sync_state = ui::ElideEmail(item->sync_state,
+ ui::kMaxProfileUsernameLength);
}
if (browser_) {
FilePath path = profile_info_->GetPathOfProfileAtIndex(i);

Powered by Google App Engine
This is Rietveld 408576698