summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/options
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views/options')
-rw-r--r--chrome/browser/views/options/fonts_page_view.cc2
-rw-r--r--chrome/browser/views/options/language_combobox_model.cc3
-rw-r--r--chrome/browser/views/options/languages_page_view.cc23
3 files changed, 15 insertions, 13 deletions
diff --git a/chrome/browser/views/options/fonts_page_view.cc b/chrome/browser/views/options/fonts_page_view.cc
index b22c557..7e99e9d 100644
--- a/chrome/browser/views/options/fonts_page_view.cc
+++ b/chrome/browser/views/options/fonts_page_view.cc
@@ -46,7 +46,7 @@ class DefaultEncodingComboboxModel : public views::Combobox::Model {
// Initialize the vector of all sorted encodings according to current
// UI locale.
if (!sorted_encoding_list.size()) {
- std::wstring locale = g_browser_process->GetApplicationLocale();
+ std::string locale = g_browser_process->GetApplicationLocale();
for (int i = 0; i < canonical_encoding_names_length_; i++) {
sorted_encoding_list.push_back(CharacterEncoding::EncodingInfo(
CharacterEncoding::GetEncodingCommandIdByIndex(i)));
diff --git a/chrome/browser/views/options/language_combobox_model.cc b/chrome/browser/views/options/language_combobox_model.cc
index 2503b6a..5e960e1 100644
--- a/chrome/browser/views/options/language_combobox_model.cc
+++ b/chrome/browser/views/options/language_combobox_model.cc
@@ -33,8 +33,7 @@ LanguageComboboxModel::LanguageComboboxModel(
void LanguageComboboxModel::InitNativeNames(
const std::vector<std::string>& locale_codes) {
- const std::string app_locale = WideToASCII(
- g_browser_process->GetApplicationLocale());
+ const std::string app_locale = g_browser_process->GetApplicationLocale();
for (size_t i = 0; i < locale_codes.size(); ++i) {
std::string locale_code_str = locale_codes[i];
const char* locale_code = locale_codes[i].c_str();
diff --git a/chrome/browser/views/options/languages_page_view.cc b/chrome/browser/views/options/languages_page_view.cc
index ac08680..5ed8587 100644
--- a/chrome/browser/views/options/languages_page_view.cc
+++ b/chrome/browser/views/options/languages_page_view.cc
@@ -291,17 +291,18 @@ void AddLanguageWindowView::ViewHierarchyChanged(bool is_add,
void AddLanguageWindowView::Init() {
// Determine Locale Codes.
std::vector<std::string> locale_codes;
- const std::wstring app_locale = g_browser_process->GetApplicationLocale();
+ const std::string app_locale = g_browser_process->GetApplicationLocale();
for (size_t i = 0; i < arraysize(accept_language_list); ++i) {
- std::wstring local_name =
- l10n_util::GetLocalName(accept_language_list[i], app_locale, false);
+ string16 display_name =
+ l10n_util::GetDisplayNameForLocale(accept_language_list[i],
+ app_locale, false);
// This is a hack. If ICU doesn't have a translated name for
- // this language, GetLocalName will just return the language code.
- // In that case, we skip it.
+ // this language, GetDisplayNameForLocale will just return the
+ // language code. In that case, we skip it.
// TODO(jungshik) : Put them at the of the list with language codes
// enclosed by brackets.
- if (IsStringASCII(local_name) &&
- WideToASCII(local_name) == accept_language_list[i])
+ if (IsStringASCII(display_name) &&
+ UTF16ToASCII(display_name) == accept_language_list[i])
continue;
locale_codes.push_back(accept_language_list[i]);
}
@@ -381,8 +382,10 @@ void LanguageOrderTableModel::SetObserver(TableModelObserver* observer) {
std::wstring LanguageOrderTableModel::GetText(int row, int column_id) {
DCHECK(row >= 0 && row < RowCount());
- const std::wstring app_locale = g_browser_process->GetApplicationLocale();
- return l10n_util::GetLocalName(languages_.at(row), app_locale, true);
+ const std::string app_locale = g_browser_process->GetApplicationLocale();
+ return l10n_util::GetDisplayNameForLocale(languages_.at(row),
+ app_locale,
+ true);
}
void LanguageOrderTableModel::Add(const std::string& language) {
@@ -702,7 +705,7 @@ void LanguagesPageView::NotifyPrefChanged(const std::wstring* pref_name) {
// The pref value for locale isn't valid. Use the current app locale
// (which is what we're currently using).
index = ui_language_model_->GetIndexFromLocale(
- WideToASCII(g_browser_process->GetApplicationLocale()));
+ g_browser_process->GetApplicationLocale());
}
DCHECK(-1 != index);
change_ui_language_combobox_->SetSelectedItem(index);