summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/options
diff options
context:
space:
mode:
authorjnd@google.com <jnd@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-21 02:58:09 +0000
committerjnd@google.com <jnd@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-21 02:58:09 +0000
commit1a3ebe10ead2ca99d2beb45b9ec65a2863406184 (patch)
treeb1c8b11cc0a32e1f561362ecee1b488bf7d91b15 /chrome/browser/views/options
parentaef050626d6412bffa292cbfcee23107cadc4b5d (diff)
downloadchromium_src-1a3ebe10ead2ca99d2beb45b9ec65a2863406184.zip
chromium_src-1a3ebe10ead2ca99d2beb45b9ec65a2863406184.tar.gz
chromium_src-1a3ebe10ead2ca99d2beb45b9ec65a2863406184.tar.bz2
As Brett pointed it out, We normally use 8-bit for encoding names since they're always ASCII. Plus, wstrings will also be 32-bit characters on Linux and Mac, which is expensive. So I make this CL by using std::string instead of std::wstring every time you have an encoding name.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1144 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/options')
-rw-r--r--chrome/browser/views/options/fonts_page_view.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/views/options/fonts_page_view.cc b/chrome/browser/views/options/fonts_page_view.cc
index 0241cc0..8307933 100644
--- a/chrome/browser/views/options/fonts_page_view.cc
+++ b/chrome/browser/views/options/fonts_page_view.cc
@@ -80,7 +80,8 @@ class DefaultEncodingComboboxModel : public ChromeViews::ComboBox::Model {
std::wstring GetEncodingCharsetByIndex(int index) {
DCHECK(index >= 0 && canonical_encoding_names_length_ > index);
- return CharacterEncoding::GetCanonicalEncodingNameByIndex(index);
+ return UTF8ToWide(
+ CharacterEncoding::GetCanonicalEncodingNameByIndex(index));
}
int GetSelectedEncodingIndex(Profile* profile) {
@@ -88,7 +89,8 @@ class DefaultEncodingComboboxModel : public ChromeViews::ComboBox::Model {
current_encoding_string.Init(prefs::kDefaultCharset,
profile->GetPrefs(),
NULL);
- const std::wstring current_encoding = current_encoding_string.GetValue();
+ const std::string current_encoding =
+ WideToUTF8(current_encoding_string.GetValue());
for (int i = 0; i < canonical_encoding_names_length_; i++) {
if (CharacterEncoding::GetCanonicalEncodingNameByIndex(i) ==
current_encoding)