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

Unified Diff: chrome/browser/dom_ui/new_tab_ui.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
« no previous file with comments | « chrome/browser/dom_ui/dom_ui.cc ('k') | chrome/browser/download/download_item_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/new_tab_ui.cc
===================================================================
--- chrome/browser/dom_ui/new_tab_ui.cc (revision 42180)
+++ chrome/browser/dom_ui/new_tab_ui.cc (working copy)
@@ -12,6 +12,7 @@
#include "base/callback.h"
#include "base/command_line.h"
#include "base/histogram.h"
+#include "base/i18n/rtl.h"
#include "base/singleton.h"
#include "base/thread.h"
#include "chrome/browser/browser.h"
@@ -643,15 +644,15 @@
// example, without LRE-PDF pair, the title "Yahoo!" will be rendered as
// "!Yahoo" within the tooltip when the mouse is over the title link.
std::wstring direction = kDefaultHtmlTextDirection;
- if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) {
+ if (base::i18n::IsRTL()) {
if (using_url_as_the_title) {
- l10n_util::WrapStringWithLTRFormatting(&title_to_set);
+ base::i18n::WrapStringWithLTRFormatting(&title_to_set);
} else {
- if (l10n_util::StringContainsStrongRTLChars(wstring_title)) {
- l10n_util::WrapStringWithRTLFormatting(&title_to_set);
+ if (base::i18n::StringContainsStrongRTLChars(wstring_title)) {
+ base::i18n::WrapStringWithRTLFormatting(&title_to_set);
direction = kRTLHtmlTextDirection;
} else {
- l10n_util::WrapStringWithLTRFormatting(&title_to_set);
+ base::i18n::WrapStringWithLTRFormatting(&title_to_set);
}
}
}
« no previous file with comments | « chrome/browser/dom_ui/dom_ui.cc ('k') | chrome/browser/download/download_item_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698