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

Unified Diff: chrome/browser/search_engines/template_url_table_model.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/search_engines/template_url.cc ('k') | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search_engines/template_url_table_model.cc
===================================================================
--- chrome/browser/search_engines/template_url_table_model.cc (revision 42180)
+++ chrome/browser/search_engines/template_url_table_model.cc (working copy)
@@ -10,6 +10,7 @@
#include "app/resource_bundle.h"
#include "app/table_model_observer.h"
#include "base/callback.h"
+#include "base/i18n/rtl.h"
#include "base/stl_util-inl.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/favicon_service.h"
@@ -180,8 +181,8 @@
// TODO(xji): Consider adding a special case if the short name is a URL,
// since those should always be displayed LTR. Please refer to
// http://crbug.com/6726 for more information.
- l10n_util::AdjustStringForLocaleDirection(url_short_name,
- &url_short_name);
+ base::i18n::AdjustStringForLocaleDirection(url_short_name,
+ &url_short_name);
return (template_url_model_->GetDefaultSearchProvider() == &url) ?
l10n_util::GetStringF(IDS_SEARCH_ENGINES_EDITOR_DEFAULT_ENGINE,
url_short_name) : url_short_name;
@@ -190,9 +191,9 @@
case IDS_SEARCH_ENGINES_EDITOR_KEYWORD_COLUMN: {
const std::wstring& keyword = url.keyword();
// Keyword should be domain name. Force it to have LTR directionality.
- if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) {
+ if (base::i18n::IsRTL()) {
std::wstring localized_keyword = keyword;
- l10n_util::WrapStringWithLTRFormatting(&localized_keyword);
+ base::i18n::WrapStringWithLTRFormatting(&localized_keyword);
return localized_keyword;
}
return keyword;
« no previous file with comments | « chrome/browser/search_engines/template_url.cc ('k') | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698