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

Unified Diff: chrome/browser/browser.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/automation/automation_provider.cc ('k') | chrome/browser/browser_encoding_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.cc
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 514d0ff4ac1af0d2763b674f626719cb26db9908..dfeb73ce2fb3e939da0f008e9e04356d28899b4a 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -1013,19 +1013,20 @@ void Browser::ToggleEncodingAutoDetect() {
void Browser::OverrideEncoding(int encoding_id) {
UserMetrics::RecordAction(L"OverrideEncoding", profile_);
- const std::wstring selected_encoding =
+ const std::string selected_encoding =
CharacterEncoding::GetCanonicalEncodingNameByCommandId(encoding_id);
TabContents* contents = GetSelectedTabContents();
if (!selected_encoding.empty() && contents)
contents->override_encoding(selected_encoding);
// Update the list of recently selected encodings.
- std::wstring new_selected_encoding_list;
+ std::string new_selected_encoding_list;
if (CharacterEncoding::UpdateRecentlySelectdEncoding(
- profile_->GetPrefs()->GetString(prefs::kRecentlySelectedEncoding),
- encoding_id,
- &new_selected_encoding_list)) {
+ WideToASCII(profile_->GetPrefs()->GetString(
+ prefs::kRecentlySelectedEncoding)),
+ encoding_id,
+ &new_selected_encoding_list)) {
profile_->GetPrefs()->SetString(prefs::kRecentlySelectedEncoding,
- new_selected_encoding_list);
+ ASCIIToWide(new_selected_encoding_list));
}
}
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/browser_encoding_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698