diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-20 06:37:01 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-20 06:37:01 +0000 |
commit | 7cf1b6ced3b14cce1d66ca0ddc713851f0d37536 (patch) | |
tree | 1c2fc9f4d52bf3046addf820d5eec03a2e150749 /chrome/renderer/localized_error.cc | |
parent | f9f4841b14a9f309ce5ee613f0d4de6afad88767 (diff) | |
download | chromium_src-7cf1b6ced3b14cce1d66ca0ddc713851f0d37536.zip chromium_src-7cf1b6ced3b14cce1d66ca0ddc713851f0d37536.tar.gz chromium_src-7cf1b6ced3b14cce1d66ca0ddc713851f0d37536.tar.bz2 |
Move RTL related functions from app/l10n_util to base/i18n/rtl
TBR=darin
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1073005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42182 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/localized_error.cc')
-rw-r--r-- | chrome/renderer/localized_error.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/renderer/localized_error.cc b/chrome/renderer/localized_error.cc index 71624cd..5365964c 100644 --- a/chrome/renderer/localized_error.cc +++ b/chrome/renderer/localized_error.cc @@ -5,6 +5,7 @@ #include "chrome/renderer/localized_error.h" #include "app/l10n_util.h" +#include "base/i18n/rtl.h" #include "base/logging.h" #include "base/string_util.h" #include "base/values.h" @@ -106,11 +107,11 @@ WebErrorNetErrorMap net_error_options[] = { bool LocaleIsRTL() { #if defined(TOOLKIT_GTK) - // l10n_util::GetTextDirection uses the GTK text direction, which doesn't work + // base::i18n::GetTextDirection uses the GTK text direction, which doesn't work // within the renderer sandbox. - return l10n_util::GetICUTextDirection() == l10n_util::RIGHT_TO_LEFT; + return base::i18n::GetICUTextDirection() == base::i18n::RIGHT_TO_LEFT; #else - return l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT; + return base::i18n::IsRTL(); #endif } @@ -156,7 +157,7 @@ void GetLocalizedErrorValues(const WebURLError& error, ASCIIToWide(std::string(error.unreachableURL.spec()))); // URLs are always LTR. if (rtl) - l10n_util::WrapStringWithLTRFormatting(&failed_url); + base::i18n::WrapStringWithLTRFormatting(&failed_url); error_strings->SetString(L"title", l10n_util::GetStringF(options.title_resource_id, failed_url)); @@ -197,7 +198,7 @@ void GetLocalizedErrorValues(const WebURLError& error, std::wstring homepage(ASCIIToWide(failed_url.GetWithEmptyPath().spec())); // URLs are always LTR. if (rtl) - l10n_util::WrapStringWithLTRFormatting(&homepage); + base::i18n::WrapStringWithLTRFormatting(&homepage); suggest_home_page->SetString(L"homePage", homepage); // TODO(tc): we actually want the unicode hostname suggest_home_page->SetString(L"hostName", @@ -242,7 +243,7 @@ void GetFormRepostErrorValues(const GURL& display_url, std::wstring failed_url(ASCIIToWide(display_url.spec())); // URLs are always LTR. if (rtl) - l10n_util::WrapStringWithLTRFormatting(&failed_url); + base::i18n::WrapStringWithLTRFormatting(&failed_url); error_strings->SetString( L"title", l10n_util::GetStringF(IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, failed_url.c_str())); |