diff options
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())); |