diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-29 20:35:19 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-29 20:35:19 +0000 |
commit | ddd231eaa03153f6d04894cceb0b4480755e1277 (patch) | |
tree | faafed02945c1f8934e6e393ac0c6b094c303cdf /chrome/browser/chromeos/status/language_menu_button.cc | |
parent | c5e30d8572ffae1e0d4fbb2fff765f9a8cbace77 (diff) | |
download | chromium_src-ddd231eaa03153f6d04894cceb0b4480755e1277.zip chromium_src-ddd231eaa03153f6d04894cceb0b4480755e1277.tar.gz chromium_src-ddd231eaa03153f6d04894cceb0b4480755e1277.tar.bz2 |
Change a bunch of string types.
Started out just trying to change PrefService::GetString and ::SetString. This snowballed a little bit. Had to change a bunch of url strings in search_engines/ from wstring to string (some of them may be better off as GURLs, but UTF-8 is a step in the right direction, since that's what GURL uses internally, as well as externally via its setters/getters).
TODO (later patch): things that ask for accepted languages should use std::string, not std::wstring.
BUG=none
TEST=try bots
Review URL: http://codereview.chromium.org/2854015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51157 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/status/language_menu_button.cc')
-rw-r--r-- | chrome/browser/chromeos/status/language_menu_button.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/chrome/browser/chromeos/status/language_menu_button.cc b/chrome/browser/chromeos/status/language_menu_button.cc index c13ea7b..0f14de0 100644 --- a/chrome/browser/chromeos/status/language_menu_button.cc +++ b/chrome/browser/chromeos/status/language_menu_button.cc @@ -155,18 +155,17 @@ LanguageMenuButton::LanguageMenuButton(StatusAreaHost* host) if (pref_service) { previous_input_method_pref_.Init( prefs::kLanguagePreviousInputMethod, pref_service, this); - const std::wstring& previous_input_method_id = + const std::string& previous_input_method_id = previous_input_method_pref_.GetValue(); - if (!previous_input_method_id.empty()) { - library->ChangeInputMethod(WideToUTF8(previous_input_method_id)); - } + if (!previous_input_method_id.empty()) + library->ChangeInputMethod(previous_input_method_id); + current_input_method_pref_.Init( prefs::kLanguageCurrentInputMethod, pref_service, this); - const std::wstring& current_input_method_id = + const std::string& current_input_method_id = current_input_method_pref_.GetValue(); - if (!current_input_method_id.empty()) { - library->ChangeInputMethod(WideToUTF8(current_input_method_id)); - } + if (!current_input_method_id.empty()) + library->ChangeInputMethod(current_input_method_id); } library->AddObserver(this); } @@ -399,8 +398,8 @@ void LanguageMenuButton::InputMethodChanged(InputMethodLibrary* obj) { // Update Chrome prefs as well. if (GetPrefService(host_)) { // Sometimes (e.g. initial boot) |previous_input_method.id| is empty. - previous_input_method_pref_.SetValue(UTF8ToWide(previous_input_method.id)); - current_input_method_pref_.SetValue(UTF8ToWide(current_input_method.id)); + previous_input_method_pref_.SetValue(previous_input_method.id); + current_input_method_pref_.SetValue(current_input_method.id); } } |