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

Unified Diff: chrome/browser/ui/toolbar/back_forward_menu_model.cc

Issue 6901003: Revert my recent changes regarding title directionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyrights Created 9 years, 8 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/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 b73deefcd54636fdf15e51f1b9ca361a6aa445da..95770034011538466dfbcbb5182efbb46e1c2bbe 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
@@ -84,22 +84,19 @@ 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);
- base::i18n::String16WithDirection menu_text(entry->GetTitleForDisplay(
+ string16 menu_text(entry->GetTitleForDisplay(
GetTabContents()->profile()->GetPrefs()->
GetString(prefs::kAcceptLanguages)));
- string16 elided =
- ui::ElideText(menu_text.string(), gfx::Font(), kMaxWidth, false);
+ menu_text = ui::ElideText(menu_text, gfx::Font(), kMaxWidth, false);
#if !defined(OS_MACOSX)
- for (size_t i = elided.find('&'); i != string16::npos;
- i = elided.find('&', i + 2)) {
- elided.insert(i, 1, '&');
+ for (size_t i = menu_text.find('&'); i != string16::npos;
+ i = menu_text.find('&', i + 2)) {
+ menu_text.insert(i, 1, '&');
}
#endif
- // TODO(evan): use directionality of title.
- // http://code.google.com/p/chromium/issues/detail?id=27094
- return elided;
+ return menu_text;
}
bool BackForwardMenuModel::IsItemDynamicAt(int index) const {
« no previous file with comments | « chrome/browser/ui/cocoa/applescript/tab_applescript.mm ('k') | chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698