| Index: chrome/renderer/localized_error.cc
|
| ===================================================================
|
| --- chrome/renderer/localized_error.cc (revision 42180)
|
| +++ chrome/renderer/localized_error.cc (working copy)
|
| @@ -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 @@
|
|
|
| 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 @@
|
| 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 @@
|
| 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 @@
|
| 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()));
|
|
|