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

Unified Diff: chrome/browser/views/bookmark_bar_view.cc

Issue 1073005: Move RTL related functions from app/l10n_util to base/i18n/rtl... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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
Index: chrome/browser/views/bookmark_bar_view.cc
===================================================================
--- chrome/browser/views/bookmark_bar_view.cc (revision 42180)
+++ chrome/browser/views/bookmark_bar_view.cc (working copy)
@@ -14,6 +14,7 @@
#include "app/os_exchange_data.h"
#include "app/resource_bundle.h"
#include "app/text_elider.h"
+#include "base/i18n/rtl.h"
#include "base/string_util.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_utils.h"
@@ -140,7 +141,7 @@
// First the title.
if (!title.empty()) {
std::wstring localized_title;
- if (l10n_util::AdjustStringForLocaleDirection(title, &localized_title))
+ if (base::i18n::AdjustStringForLocaleDirection(title, &localized_title))
result.append(gfx::ElideText(localized_title, tt_font, max_width));
else
result.append(gfx::ElideText(title, tt_font, max_width));
@@ -158,8 +159,8 @@
// the Unicode BiDi algorithm puts certain characters on the left by
// default.
std::wstring elided_url(gfx::ElideUrl(url, tt_font, max_width, languages));
- if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT)
- l10n_util::WrapStringWithLTRFormatting(&elided_url);
+ if (base::i18n::IsRTL())
+ base::i18n::WrapStringWithLTRFormatting(&elided_url);
result.append(elided_url);
}
return result;
« no previous file with comments | « chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc ('k') | chrome/browser/views/bookmark_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698