| Index: chrome/browser/ui/toolbar/back_forward_menu_model.cc
|
| diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model.cc b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
|
| index 95770034011538466dfbcbb5182efbb46e1c2bbe..b73deefcd54636fdf15e51f1b9ca361a6aa445da 100644
|
| --- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc
|
| +++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
|
| @@ -84,19 +84,22 @@ string16 BackForwardMenuModel::GetLabelAt(int index) const {
|
| // Return the entry title, escaping any '&' characters and eliding it if it's
|
| // super long.
|
| NavigationEntry* entry = GetNavigationEntry(index);
|
| - string16 menu_text(entry->GetTitleForDisplay(
|
| + base::i18n::String16WithDirection menu_text(entry->GetTitleForDisplay(
|
| GetTabContents()->profile()->GetPrefs()->
|
| GetString(prefs::kAcceptLanguages)));
|
| - menu_text = ui::ElideText(menu_text, gfx::Font(), kMaxWidth, false);
|
| + string16 elided =
|
| + ui::ElideText(menu_text.string(), gfx::Font(), kMaxWidth, false);
|
|
|
| #if !defined(OS_MACOSX)
|
| - for (size_t i = menu_text.find('&'); i != string16::npos;
|
| - i = menu_text.find('&', i + 2)) {
|
| - menu_text.insert(i, 1, '&');
|
| + for (size_t i = elided.find('&'); i != string16::npos;
|
| + i = elided.find('&', i + 2)) {
|
| + elided.insert(i, 1, '&');
|
| }
|
| #endif
|
|
|
| - return menu_text;
|
| + // TODO(evan): use directionality of title.
|
| + // http://code.google.com/p/chromium/issues/detail?id=27094
|
| + return elided;
|
| }
|
|
|
| bool BackForwardMenuModel::IsItemDynamicAt(int index) const {
|
|
|