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

Unified Diff: chrome/browser/dom_ui/dom_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/chrome_url_data_manager.cc ('k') | chrome/browser/dom_ui/new_tab_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/dom_ui.cc
===================================================================
--- chrome/browser/dom_ui/dom_ui.cc (revision 42180)
+++ chrome/browser/dom_ui/dom_ui.cc (working copy)
@@ -4,9 +4,10 @@
#include "chrome/browser/dom_ui/dom_ui.h"
-#include "app/l10n_util.h"
+#include "base/i18n/rtl.h"
#include "base/json/json_writer.h"
#include "base/stl_util-inl.h"
+#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/browser_theme_provider.h"
@@ -129,12 +130,12 @@
// as the title, we mark the title as LTR since URLs are always treated as
// left to right strings.
std::wstring title_to_set(title);
- 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 {
bool success =
- l10n_util::AdjustStringForLocaleDirection(title, &title_to_set);
+ base::i18n::AdjustStringForLocaleDirection(title, &title_to_set);
DCHECK(success ? (title != title_to_set) : (title == title_to_set));
}
}
« no previous file with comments | « chrome/browser/dom_ui/chrome_url_data_manager.cc ('k') | chrome/browser/dom_ui/new_tab_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698