Index: chrome/browser/ui/toolbar/wrench_menu_model.cc |
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc |
index 3edb4864a92d017285f096d2fd5f920c01275249..37186fd5039bb767a6b22d2cc8685fdae53c63b0 100644 |
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc |
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc |
@@ -48,6 +48,7 @@ |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/base/models/button_menu_item_model.h" |
#include "ui/base/resource/resource_bundle.h" |
+#include "ui/base/text/text_elider.h" |
#include "ui/gfx/image/image.h" |
#if defined(TOOLKIT_USES_GTK) |
@@ -267,8 +268,11 @@ string16 WrenchMenuModel::GetLabelForCommandId(int command_id) const { |
std::string username = browser_->GetProfile()->GetPrefs()->GetString( |
prefs::kGoogleServicesUsername); |
if (!username.empty()) { |
+ string16 elided_username = ui::ElideEmail( |
+ UTF8ToUTF16(username), |
+ ui::kMaxProfileUsernameLength); |
return l10n_util::GetStringFUTF16(IDS_SYNC_MENU_SYNCED_LABEL, |
- UTF8ToUTF16(username)); |
+ elided_username); |
} |
} |
return l10n_util::GetStringFUTF16(IDS_SYNC_MENU_PRE_SYNCED_LABEL, |