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

Unified Diff: chrome/browser/gtk/options/fonts_page_gtk.cc

Issue 192017: Convert std::wstring encoding names to std::string in a bunch of files. (Closed)
Patch Set: mac and linux fixes Created 11 years, 3 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/browser_toolbar_gtk.cc ('k') | chrome/browser/metrics/metrics_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/options/fonts_page_gtk.cc
diff --git a/chrome/browser/gtk/options/fonts_page_gtk.cc b/chrome/browser/gtk/options/fonts_page_gtk.cc
index 3f4941f50aa4b6b8b13d278bf79d379870d58c60..7fa728535e8cd58f12d464fccfcde224d77745a4 100644
--- a/chrome/browser/gtk/options/fonts_page_gtk.cc
+++ b/chrome/browser/gtk/options/fonts_page_gtk.cc
@@ -140,7 +140,8 @@ void FontsPageGtk::NotifyPrefChanged(const std::wstring* pref_name) {
fixed_width_size_.GetValue()).c_str());
}
if (!pref_name || *pref_name == prefs::kDefaultCharset) {
- const std::wstring current_encoding = default_encoding_.GetValue();
+ const std::string current_encoding =
+ WideToASCII(default_encoding_.GetValue());
for (size_t i = 0; i < sorted_encoding_list_.size(); i++) {
if (CharacterEncoding::GetCanonicalEncodingNameByCommandId(
sorted_encoding_list_[i].encoding_id) == current_encoding) {
@@ -201,6 +202,6 @@ void FontsPageGtk::OnDefaultEncodingChanged(GtkComboBox* combo_box,
return;
}
fonts_page->default_encoding_.SetValue(
- CharacterEncoding::GetCanonicalEncodingNameByCommandId(
- fonts_page->sorted_encoding_list_[index].encoding_id));
+ ASCIIToWide(CharacterEncoding::GetCanonicalEncodingNameByCommandId(
+ fonts_page->sorted_encoding_list_[index].encoding_id)));
}
« no previous file with comments | « chrome/browser/gtk/browser_toolbar_gtk.cc ('k') | chrome/browser/metrics/metrics_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698