diff options
Diffstat (limited to 'chrome/browser/search_engines')
-rw-r--r-- | chrome/browser/search_engines/template_url.cc | 5 | ||||
-rw-r--r-- | chrome/browser/search_engines/template_url_table_model.cc | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/search_engines/template_url.cc b/chrome/browser/search_engines/template_url.cc index 09201d6..fe83561 100644 --- a/chrome/browser/search_engines/template_url.cc +++ b/chrome/browser/search_engines/template_url.cc @@ -6,6 +6,7 @@ #include "app/l10n_util.h" #include "base/i18n/icu_string_conversions.h" +#include "base/i18n/rtl.h" #include "base/logging.h" #include "base/utf_string_conversions.h" #include "chrome/browser/browser_process.h" @@ -546,8 +547,8 @@ bool TemplateURL::SupportsReplacement(const TemplateURL* turl) { std::wstring TemplateURL::AdjustedShortNameForLocaleDirection() const { std::wstring bidi_safe_short_name; - if (l10n_util::AdjustStringForLocaleDirection(short_name_, - &bidi_safe_short_name)) + if (base::i18n::AdjustStringForLocaleDirection(short_name_, + &bidi_safe_short_name)) return bidi_safe_short_name; return short_name_; } diff --git a/chrome/browser/search_engines/template_url_table_model.cc b/chrome/browser/search_engines/template_url_table_model.cc index 84ce653..961506e 100644 --- a/chrome/browser/search_engines/template_url_table_model.cc +++ b/chrome/browser/search_engines/template_url_table_model.cc @@ -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 @@ std::wstring TemplateURLTableModel::GetText(int row, int col_id) { // 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 @@ std::wstring TemplateURLTableModel::GetText(int row, int col_id) { 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; |