diff options
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/options/fonts_page_view.cc | 8 | ||||
-rw-r--r-- | chrome/browser/views/options/fonts_page_view.h | 13 | ||||
-rw-r--r-- | chrome/browser/views/toolbar_view.cc | 6 |
3 files changed, 14 insertions, 13 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() { diff --git a/chrome/browser/views/options/fonts_page_view.h b/chrome/browser/views/options/fonts_page_view.h index d85d8ff..193a5e7 100644 --- a/chrome/browser/views/options/fonts_page_view.h +++ b/chrome/browser/views/options/fonts_page_view.h @@ -2,8 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_VIEWS_OPTIONS_FONTS_PAGE_VIEW_H__ -#define CHROME_BROWSER_VIEWS_OPTIONS_FONTS_PAGE_VIEW_H__ +#ifndef CHROME_BROWSER_VIEWS_OPTIONS_FONTS_PAGE_VIEW_H_ +#define CHROME_BROWSER_VIEWS_OPTIONS_FONTS_PAGE_VIEW_H_ + +#include <string> #include "chrome/browser/views/options/options_page_view.h" #include "chrome/browser/shell_dialogs.h" @@ -12,7 +14,6 @@ #include "views/controls/button/button.h" #include "views/view.h" - namespace views { class GroupboxView; class Label; @@ -118,10 +119,10 @@ class FontsPageView : public OptionsPageView, scoped_ptr<DefaultEncodingComboboxModel> default_encoding_combobox_model_; views::Label* default_encoding_combobox_label_; views::Combobox* default_encoding_combobox_; - std::wstring default_encoding_selected_; + std::string default_encoding_selected_; bool default_encoding_changed_; - DISALLOW_EVIL_CONSTRUCTORS(FontsPageView); + DISALLOW_COPY_AND_ASSIGN(FontsPageView); }; -#endif // #ifndef CHROME_BROWSER_VIEWS_OPTIONS_FONTS_PAGE_VIEW_H__ +#endif // CHROME_BROWSER_VIEWS_OPTIONS_FONTS_PAGE_VIEW_H_ diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc index 73d57a7..df46370 100644 --- a/chrome/browser/views/toolbar_view.cc +++ b/chrome/browser/views/toolbar_view.cc @@ -98,17 +98,17 @@ void EncodingMenuModel::Build() { encoding_menu_items.begin(); for (; it != encoding_menu_items.end(); ++it) { int id = it->first; - std::wstring& label = it->second; + string16& label = it->second; if (id == 0) { AddSeparator(); } else { if (id == IDC_ENCODING_AUTO_DETECT) { - AddCheckItem(id, WideToUTF16Hack(label)); + AddCheckItem(id, label); } else { // Use the id of the first radio command as the id of the group. if (group_id <= 0) group_id = id; - AddRadioItem(id, WideToUTF16Hack(label), group_id); + AddRadioItem(id, label, group_id); } } } |