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

Unified Diff: chrome/browser/language_combobox_model.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/gtk/tabs/tab_strip_gtk.cc ('k') | chrome/browser/possible_url_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/language_combobox_model.cc
===================================================================
--- chrome/browser/language_combobox_model.cc (revision 42180)
+++ chrome/browser/language_combobox_model.cc (working copy)
@@ -5,6 +5,7 @@
#include "chrome/browser/language_combobox_model.h"
#include "app/l10n_util.h"
+#include "base/i18n/rtl.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/metrics/user_metrics.h"
@@ -86,16 +87,16 @@
// parentheses or languages appearing in the wrong order.
std::wstring locale_name_localized;
std::wstring locale_name;
- if (l10n_util::AdjustStringForLocaleDirection(locale_names_[index],
- &locale_name_localized))
+ if (base::i18n::AdjustStringForLocaleDirection(locale_names_[index],
+ &locale_name_localized))
locale_name.assign(locale_name_localized);
else
locale_name.assign(locale_names_[index]);
std::wstring native_name_localized;
std::wstring native_name;
- if (l10n_util::AdjustStringForLocaleDirection(it->second.native_name,
- &native_name_localized))
+ if (base::i18n::AdjustStringForLocaleDirection(it->second.native_name,
+ &native_name_localized))
native_name.assign(native_name_localized);
else
native_name.assign(it->second.native_name);
@@ -106,7 +107,7 @@
std::wstring formatted_item;
SStringPrintf(&formatted_item, L"%ls - %ls", locale_name.c_str(),
native_name.c_str());
- if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT)
+ if (base::i18n::IsRTL())
// Somehow combo box (even with LAYOUTRTL flag) doesn't get this
// right so we add RTL BDO (U+202E) to set the direction
// explicitly.
« no previous file with comments | « chrome/browser/gtk/tabs/tab_strip_gtk.cc ('k') | chrome/browser/possible_url_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698