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

Unified Diff: chrome/browser/views/download_item_view.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/views/bookmark_context_menu.cc ('k') | chrome/browser/views/edit_search_engine_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/download_item_view.cc
===================================================================
--- chrome/browser/views/download_item_view.cc (revision 42180)
+++ chrome/browser/views/download_item_view.cc (working copy)
@@ -13,6 +13,7 @@
#include "app/theme_provider.h"
#include "base/callback.h"
#include "base/file_path.h"
+#include "base/i18n/rtl.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/browser_process.h"
@@ -90,7 +91,7 @@
// The menu's alignment is determined based on the UI layout.
views::Menu2::Alignment alignment;
- if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT)
+ if (base::i18n::IsRTL())
alignment = views::Menu2::ALIGN_TOPRIGHT;
else
alignment = views::Menu2::ALIGN_TOPLEFT;
@@ -285,8 +286,8 @@
} else {
ElideString(rootname, kFileNameMaxLength - extension.length(), &rootname);
std::wstring filename = rootname + L"." + extension;
- if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT)
- l10n_util::WrapStringWithLTRFormatting(&filename);
+ if (base::i18n::IsRTL())
+ base::i18n::WrapStringWithLTRFormatting(&filename);
dangerous_download_label_ = new views::Label(
l10n_util::GetStringF(IDS_PROMPT_DANGEROUS_DOWNLOAD, filename));
}
« no previous file with comments | « chrome/browser/views/bookmark_context_menu.cc ('k') | chrome/browser/views/edit_search_engine_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698