summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/options/fonts_page_view.cc
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 22:23:40 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 22:23:40 +0000
commit41fc0320689c888625b5f13b5540a85590d6f830 (patch)
tree121dc85682d85da5eb8ff3ef645985a9bb61d635 /chrome/browser/views/options/fonts_page_view.cc
parentfe2c7f0cb1d2513e357f3c840bb1aa00739aafdf (diff)
downloadchromium_src-41fc0320689c888625b5f13b5540a85590d6f830.zip
chromium_src-41fc0320689c888625b5f13b5540a85590d6f830.tar.gz
chromium_src-41fc0320689c888625b5f13b5540a85590d6f830.tar.bz2
Convert std::wstring encoding names to std::string in a bunch of files.
BUG=8647 (http://crbug.com/8647) TEST=run unit_tests.exe and ui_tests.exe Original patch by Thiago Farina <thiago.farina@gmail.com> at http://codereview.chromium.org/179057/show Some linux related fixes by me. Review URL: http://codereview.chromium.org/192017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25529 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/options/fonts_page_view.cc')
-rw-r--r--chrome/browser/views/options/fonts_page_view.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/views/options/fonts_page_view.cc b/chrome/browser/views/options/fonts_page_view.cc
index 16836e6..a6e2d91 100644
--- a/chrome/browser/views/options/fonts_page_view.cc
+++ b/chrome/browser/views/options/fonts_page_view.cc
@@ -68,7 +68,7 @@ class DefaultEncodingComboboxModel : public ComboboxModel {
return sorted_encoding_list[index].encoding_display_name;
}
- std::wstring GetEncodingCharsetByIndex(int index) {
+ std::string GetEncodingCharsetByIndex(int index) {
DCHECK(index >= 0 && canonical_encoding_names_length_ > index);
int encoding_id = sorted_encoding_list[index].encoding_id;
return CharacterEncoding::GetCanonicalEncodingNameByCommandId(encoding_id);
@@ -81,7 +81,7 @@ class DefaultEncodingComboboxModel : public ComboboxModel {
NULL);
const std::wstring current_encoding = current_encoding_string.GetValue();
for (int i = 0; i < canonical_encoding_names_length_; i++) {
- if (GetEncodingCharsetByIndex(i) == current_encoding)
+ if (GetEncodingCharsetByIndex(i) == WideToASCII(current_encoding))
return i;
}
@@ -90,7 +90,7 @@ class DefaultEncodingComboboxModel : public ComboboxModel {
private:
int canonical_encoding_names_length_;
- DISALLOW_EVIL_CONSTRUCTORS(DefaultEncodingComboboxModel);
+ DISALLOW_COPY_AND_ASSIGN(DefaultEncodingComboboxModel);
};
////////////////////////////////////////////////////////////////////////////////
@@ -308,7 +308,7 @@ void FontsPageView::SaveChanges() {
}
// Set Encoding.
if (default_encoding_changed_)
- default_encoding_.SetValue(default_encoding_selected_);
+ default_encoding_.SetValue(ASCIIToWide(default_encoding_selected_));
}
void FontsPageView::InitControlLayout() {