summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-06 00:31:09 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-06 00:31:09 +0000
commit910688e6d2f2d39a082e2afd999f42c0e435201e (patch)
treed58d1dd7bd61123a7b95d73ce54e9ca0f3e2dbb0 /chrome/browser
parentb0b2a3dd01962592fc8c1f981415ab2bdb8edefb (diff)
downloadchromium_src-910688e6d2f2d39a082e2afd999f42c0e435201e.zip
chromium_src-910688e6d2f2d39a082e2afd999f42c0e435201e.tar.gz
chromium_src-910688e6d2f2d39a082e2afd999f42c0e435201e.tar.bz2
Remove wstring from l10n_util. Part 6.
BUG=9911 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6056009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70565 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/autocomplete/autocomplete_accessibility.cc2
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.cc2
-rw-r--r--chrome/browser/first_run/first_run_win.cc22
-rw-r--r--chrome/browser/hang_monitor/hung_plugin_action.cc14
-rw-r--r--chrome/browser/ui/login/login_prompt_win.cc4
-rw-r--r--chrome/browser/ui/views/edit_search_engine_dialog.cc14
-rw-r--r--chrome/browser/ui/views/external_protocol_dialog.cc26
-rw-r--r--chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc4
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc4
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.cc5
-rw-r--r--chrome/browser/ui/views/location_bar/star_view.cc7
-rw-r--r--chrome/browser/ui/views/notifications/balloon_view.cc4
-rw-r--r--chrome/browser/ui/views/options/advanced_contents_view.cc152
-rw-r--r--chrome/browser/ui/views/options/advanced_page_view.cc14
-rw-r--r--chrome/browser/ui/views/options/content_filter_page_view.cc13
-rw-r--r--chrome/browser/ui/views/options/content_page_view.cc65
-rw-r--r--chrome/browser/ui/views/options/content_settings_window_view.cc3
-rw-r--r--chrome/browser/ui/views/options/cookie_filter_page_view.cc17
-rw-r--r--chrome/browser/ui/views/options/cookies_view.cc16
-rw-r--r--chrome/browser/ui/views/options/exception_editor_view.cc12
-rw-r--r--chrome/browser/ui/views/options/exceptions_page_view.cc12
-rw-r--r--chrome/browser/ui/views/options/exceptions_view.cc26
-rw-r--r--chrome/browser/ui/views/options/fonts_languages_window_view.cc12
-rw-r--r--chrome/browser/ui/views/options/fonts_page_view.cc36
-rw-r--r--chrome/browser/ui/views/options/general_page_view.cc81
-rw-r--r--chrome/browser/ui/views/options/languages_page_view.cc45
-rw-r--r--chrome/browser/ui/views/options/options_group_view.cc10
-rw-r--r--chrome/browser/ui/views/options/options_window_view.cc31
-rw-r--r--chrome/browser/ui/views/options/passwords_exceptions_window_view.cc12
-rw-r--r--chrome/browser/ui/views/options/passwords_page_view.cc31
-rw-r--r--chrome/browser/ui/views/options/plugin_filter_page_view.cc3
-rw-r--r--chrome/browser/ui/views/options/simple_content_exceptions_view.cc9
-rw-r--r--chrome/browser/ui/views/restart_message_box.cc8
-rw-r--r--chrome/browser/ui/views/sad_tab_view.cc7
-rw-r--r--chrome/browser/ui/views/tabs/base_tab.cc6
-rw-r--r--chrome/browser/ui/views/tabs/tab_strip.cc4
-rw-r--r--chrome/browser/ui/views/task_manager_view.cc15
37 files changed, 433 insertions, 315 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_accessibility.cc b/chrome/browser/autocomplete/autocomplete_accessibility.cc
index 0f622d7..747d8fe 100644
--- a/chrome/browser/autocomplete/autocomplete_accessibility.cc
+++ b/chrome/browser/autocomplete/autocomplete_accessibility.cc
@@ -91,7 +91,7 @@ STDMETHODIMP AutocompleteAccessibility::get_accName(VARIANT var_id,
return E_INVALIDARG;
}
- std::wstring temp_name = l10n_util::GetString(IDS_ACCNAME_LOCATION);
+ string16 temp_name = l10n_util::GetStringUTF16(IDS_ACCNAME_LOCATION);
if (!temp_name.empty()) {
// Return name retrieved.
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
index 118f050..cc2a486 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
@@ -1012,7 +1012,7 @@ bool AutocompleteEditViewWin::IsItemForCommandIdDynamic(int command_id) const {
std::wstring AutocompleteEditViewWin::GetLabelForCommandId(
int command_id) const {
DCHECK(command_id == IDS_PASTE_AND_GO);
- return l10n_util::GetString(model_->is_paste_and_search() ?
+ return l10n_util::GetStringUTF16(model_->is_paste_and_search() ?
IDS_PASTE_AND_SEARCH : IDS_PASTE_AND_GO);
}
diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc
index 088ee5a..5f6a0b0 100644
--- a/chrome/browser/first_run/first_run_win.cc
+++ b/chrome/browser/first_run/first_run_win.cc
@@ -692,16 +692,17 @@ class TryChromeDialog : public views::ButtonListener,
// The heading has two flavors of text, the alt one features extensions but
// we only use it in the US until some international issues are fixed.
const std::string app_locale = g_browser_process->GetApplicationLocale();
- std::wstring heading;
+ int heading_id;
switch (version_) {
- case 0: heading = l10n_util::GetString(IDS_TRY_TOAST_HEADING); break;
- case 1: heading = l10n_util::GetString(IDS_TRY_TOAST_HEADING2); break;
- case 2: heading = l10n_util::GetString(IDS_TRY_TOAST_HEADING3); break;
- case 3: heading = l10n_util::GetString(IDS_TRY_TOAST_HEADING4); break;
+ case 0: heading_id = IDS_TRY_TOAST_HEADING; break;
+ case 1: heading_id = IDS_TRY_TOAST_HEADING2; break;
+ case 2: heading_id = IDS_TRY_TOAST_HEADING3; break;
+ case 3: heading_id = IDS_TRY_TOAST_HEADING4; break;
default:
NOTREACHED() << "Cannot determine which headline to show.";
return Upgrade::TD_DIALOG_ERROR;
}
+ string16 heading = l10n_util::GetStringUTF16(heading_id);
views::Label* label = new views::Label(heading);
label->SetFont(rb.GetFont(ResourceBundle::MediumBoldFont));
label->SetMultiLine(true);
@@ -720,23 +721,22 @@ class TryChromeDialog : public views::ButtonListener,
layout->AddView(close_button);
// Second row views.
- const std::wstring try_it(l10n_util::GetString(IDS_TRY_TOAST_TRY_OPT));
+ const string16 try_it(l10n_util::GetStringUTF16(IDS_TRY_TOAST_TRY_OPT));
layout->StartRowWithPadding(0, 1, 0, 10);
try_chrome_ = new views::RadioButton(try_it, 1);
layout->AddView(try_chrome_);
try_chrome_->SetChecked(true);
// Third row views.
- const std::wstring
- kill_it(l10n_util::GetString(IDS_UNINSTALL_CHROME));
+ const string16 kill_it(l10n_util::GetStringUTF16(IDS_UNINSTALL_CHROME));
layout->StartRow(0, 2);
kill_chrome_ = new views::RadioButton(kill_it, 1);
layout->AddView(kill_chrome_);
// Fourth row views.
- const std::wstring ok_it(l10n_util::GetString(IDS_OK));
- const std::wstring cancel_it(l10n_util::GetString(IDS_TRY_TOAST_CANCEL));
- const std::wstring why_this(l10n_util::GetString(IDS_TRY_TOAST_WHY));
+ const string16 ok_it(l10n_util::GetStringUTF16(IDS_OK));
+ const string16 cancel_it(l10n_util::GetStringUTF16(IDS_TRY_TOAST_CANCEL));
+ const string16 why_this(l10n_util::GetStringUTF16(IDS_TRY_TOAST_WHY));
layout->StartRowWithPadding(0, 3, 0, 10);
views::Button* accept_button = new views::NativeButton(this, ok_it);
accept_button->set_tag(BT_OK_BUTTON);
diff --git a/chrome/browser/hang_monitor/hung_plugin_action.cc b/chrome/browser/hang_monitor/hung_plugin_action.cc
index 95025c0..77062b2 100644
--- a/chrome/browser/hang_monitor/hung_plugin_action.cc
+++ b/chrome/browser/hang_monitor/hung_plugin_action.cc
@@ -42,18 +42,18 @@ bool HungPluginAction::OnHungWindowDetected(HWND hung_window,
NOTREACHED() << "Terminated a hung plugin process.";
*action = HungWindowNotification::HUNG_WINDOW_TERMINATE_PROCESS;
} else {
- std::wstring plugin_name;
+ string16 plugin_name;
GetPluginName(hung_window,
top_level_window_process_id,
&plugin_name);
if (plugin_name.empty()) {
- plugin_name = l10n_util::GetString(IDS_UNKNOWN_PLUGIN_NAME);
+ plugin_name = l10n_util::GetStringUTF16(IDS_UNKNOWN_PLUGIN_NAME);
}
- std::wstring msg = l10n_util::GetStringF(IDS_BROWSER_HANGMONITOR,
- plugin_name);
- std::wstring title = l10n_util::GetString(IDS_BROWSER_HANGMONITOR_TITLE);
- // Before displaying the message box,invoke SendMessageCallback on the
- // hung window. If the callback ever hits,the window is not hung anymore
+ string16 msg = l10n_util::GetStringFUTF16(IDS_BROWSER_HANGMONITOR,
+ plugin_name);
+ string16 title = l10n_util::GetStringUTF16(IDS_BROWSER_HANGMONITOR_TITLE);
+ // Before displaying the message box, invoke SendMessageCallback on the
+ // hung window. If the callback ever hits, the window is not hung anymore
// and we can dismiss the message box.
SendMessageCallback(hung_window,
WM_NULL,
diff --git a/chrome/browser/ui/login/login_prompt_win.cc b/chrome/browser/ui/login/login_prompt_win.cc
index a167885..58a93bc 100644
--- a/chrome/browser/ui/login/login_prompt_win.cc
+++ b/chrome/browser/ui/login/login_prompt_win.cc
@@ -49,12 +49,12 @@ class LoginHandlerWin : public LoginHandler,
virtual std::wstring GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
if (button == MessageBoxFlags::DIALOGBUTTON_OK)
- return l10n_util::GetString(IDS_LOGIN_DIALOG_OK_BUTTON_LABEL);
+ return l10n_util::GetStringUTF16(IDS_LOGIN_DIALOG_OK_BUTTON_LABEL);
return DialogDelegate::GetDialogButtonLabel(button);
}
virtual std::wstring GetWindowTitle() const {
- return l10n_util::GetString(IDS_LOGIN_DIALOG_TITLE);
+ return l10n_util::GetStringUTF16(IDS_LOGIN_DIALOG_TITLE);
}
virtual void WindowClosing() {
diff --git a/chrome/browser/ui/views/edit_search_engine_dialog.cc b/chrome/browser/ui/views/edit_search_engine_dialog.cc
index b77b778..e699e97 100644
--- a/chrome/browser/ui/views/edit_search_engine_dialog.cc
+++ b/chrome/browser/ui/views/edit_search_engine_dialog.cc
@@ -77,9 +77,9 @@ bool EditSearchEngineDialog::IsModal() const {
}
std::wstring EditSearchEngineDialog::GetWindowTitle() const {
- return l10n_util::GetString(controller_->template_url() ?
+ return UTF16ToWide(l10n_util::GetStringUTF16(controller_->template_url() ?
IDS_SEARCH_ENGINES_EDITOR_EDIT_WINDOW_TITLE :
- IDS_SEARCH_ENGINES_EDITOR_NEW_WINDOW_TITLE);
+ IDS_SEARCH_ENGINES_EDITOR_NEW_WINDOW_TITLE));
}
bool EditSearchEngineDialog::IsDialogButtonEnabled(
@@ -204,8 +204,8 @@ void EditSearchEngineDialog::Init() {
// In order to fix this problem we transform the substring "%s" so that it
// is displayed correctly when rendered in an RTL context.
layout->StartRowWithPadding(0, 2, 0, unrelated_y);
- std::wstring description =
- l10n_util::GetString(IDS_SEARCH_ENGINES_EDITOR_URL_DESCRIPTION_LABEL);
+ std::wstring description = UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_SEARCH_ENGINES_EDITOR_URL_DESCRIPTION_LABEL));
if (base::i18n::IsRTL()) {
const std::wstring reversed_percent(L"s%");
std::wstring::size_type percent_index =
@@ -224,7 +224,8 @@ void EditSearchEngineDialog::Init() {
}
views::Label* EditSearchEngineDialog::CreateLabel(int message_id) {
- views::Label* label = new views::Label(l10n_util::GetString(message_id));
+ views::Label* label =
+ new views::Label(UTF16ToWide(l10n_util::GetStringUTF16(message_id)));
label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
return label;
}
@@ -258,7 +259,8 @@ void EditSearchEngineDialog::UpdateImageView(ImageView* image_view,
ResourceBundle::GetSharedInstance().GetBitmapNamed(
IDR_INPUT_GOOD));
} else {
- image_view->SetTooltipText(l10n_util::GetString(invalid_message_id));
+ image_view->SetTooltipText(
+ UTF16ToWide(l10n_util::GetStringUTF16(invalid_message_id)));
image_view->SetImage(
ResourceBundle::GetSharedInstance().GetBitmapNamed(
IDR_INPUT_ALERT));
diff --git a/chrome/browser/ui/views/external_protocol_dialog.cc b/chrome/browser/ui/views/external_protocol_dialog.cc
index bb081a7..1155770 100644
--- a/chrome/browser/ui/views/external_protocol_dialog.cc
+++ b/chrome/browser/ui/views/external_protocol_dialog.cc
@@ -62,13 +62,15 @@ int ExternalProtocolDialog::GetDefaultDialogButton() const {
std::wstring ExternalProtocolDialog::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
if (button == MessageBoxFlags::DIALOGBUTTON_OK)
- return l10n_util::GetString(IDS_EXTERNAL_PROTOCOL_OK_BUTTON_TEXT);
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_EXTERNAL_PROTOCOL_OK_BUTTON_TEXT));
else
- return l10n_util::GetString(IDS_EXTERNAL_PROTOCOL_CANCEL_BUTTON_TEXT);
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_EXTERNAL_PROTOCOL_CANCEL_BUTTON_TEXT));
}
std::wstring ExternalProtocolDialog::GetWindowTitle() const {
- return l10n_util::GetString(IDS_EXTERNAL_PROTOCOL_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_EXTERNAL_PROTOCOL_TITLE));
}
void ExternalProtocolDialog::DeleteDelegate() {
@@ -127,22 +129,24 @@ ExternalProtocolDialog::ExternalProtocolDialog(TabContents* tab_contents,
kMaxUrlWithoutSchemeSize, &elided_url_without_scheme);
gfx::ElideString(command, kMaxCommandSize, &elided_command);
- std::wstring message_text = l10n_util::GetStringF(
+ std::wstring message_text = UTF16ToWide(l10n_util::GetStringFUTF16(
IDS_EXTERNAL_PROTOCOL_INFORMATION,
- ASCIIToWide(url.scheme() + ":"),
- elided_url_without_scheme) + L"\n\n";
+ ASCIIToUTF16(url.scheme() + ":"),
+ elided_url_without_scheme) + ASCIIToUTF16("\n\n"));
- message_text += l10n_util::GetStringF(
- IDS_EXTERNAL_PROTOCOL_APPLICATION_TO_LAUNCH, elided_command) + L"\n\n";
+ message_text += UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_EXTERNAL_PROTOCOL_APPLICATION_TO_LAUNCH,
+ elided_command) + ASCIIToUTF16("\n\n"));
- message_text += l10n_util::GetString(IDS_EXTERNAL_PROTOCOL_WARNING);
+ message_text +=
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_EXTERNAL_PROTOCOL_WARNING));
message_box_view_ = new MessageBoxView(MessageBoxFlags::kIsConfirmMessageBox,
message_text,
std::wstring(),
kMessageWidth);
- message_box_view_->SetCheckBoxLabel(
- l10n_util::GetString(IDS_EXTERNAL_PROTOCOL_CHECKBOX_TEXT));
+ message_box_view_->SetCheckBoxLabel(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_EXTERNAL_PROTOCOL_CHECKBOX_TEXT)));
HWND root_hwnd;
if (tab_contents_) {
diff --git a/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc b/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc
index d7efbe9..fdfff0a 100644
--- a/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc
@@ -7,6 +7,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/compiler_specific.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/views/frame/browser_frame.h"
#include "chrome/browser/views/frame/browser_view.h"
@@ -71,7 +72,8 @@ AppPanelBrowserFrameView::AppPanelBrowserFrameView(BrowserFrame* frame,
rb.GetBitmapNamed(IDR_CLOSE_BAR_H));
close_button_->SetImage(views::CustomButton::BS_PUSHED,
rb.GetBitmapNamed(IDR_CLOSE_BAR_P));
- close_button_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_CLOSE));
+ close_button_->SetAccessibleName(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)));
AddChildView(close_button_);
window_icon_ = new TabIconView(this);
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 724ebd0..d1d2352 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1127,8 +1127,8 @@ void BrowserView::ShowCollectedCookiesDialog(TabContents* tab_contents) {
void BrowserView::ShowProfileErrorDialog(int message_id) {
#if defined(OS_WIN)
- std::wstring title = l10n_util::GetString(IDS_PRODUCT_NAME);
- std::wstring message = l10n_util::GetString(message_id);
+ string16 title = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
+ string16 message = l10n_util::GetStringUTF16(message_id);
app::win::MessageBox(GetNativeHandle(), message, title,
MB_OK | MB_ICONWARNING | MB_TOPMOST);
#elif defined(OS_LINUX)
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 7915916..0bcccaa 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -185,7 +185,7 @@ void LocationBarView::Init() {
location_entry_view_->set_focus_view(this);
location_entry_view_->Attach(location_entry_->GetNativeView());
location_entry_view_->SetAccessibleName(
- l10n_util::GetString(IDS_ACCNAME_LOCATION));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_LOCATION)));
selected_keyword_view_ = new SelectedKeywordView(
kSelectedKeywordBackgroundImages, IDR_KEYWORD_SEARCH_MAGNIFIER,
@@ -221,7 +221,8 @@ void LocationBarView::Init() {
// AutocompleteEditView to close its popup.
SetNotifyWhenVisibleBoundsInRootChanges(true);
- SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_LOCATION));
+ SetAccessibleName(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_LOCATION)));
// Initialize the location entry. We do this to avoid a black flash which is
// visible when the location entry has just been initialized.
diff --git a/chrome/browser/ui/views/location_bar/star_view.cc b/chrome/browser/ui/views/location_bar/star_view.cc
index 95de4c0..f806037 100644
--- a/chrome/browser/ui/views/location_bar/star_view.cc
+++ b/chrome/browser/ui/views/location_bar/star_view.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/command_updater.h"
#include "chrome/browser/ui/view_ids.h"
@@ -24,12 +25,12 @@ StarView::~StarView() {
}
void StarView::SetToggled(bool on) {
- SetTooltipText(l10n_util::GetString(
- on ? IDS_TOOLTIP_STARRED : IDS_TOOLTIP_STAR));
+ SetTooltipText(UTF16ToWide(l10n_util::GetStringUTF16(
+ on ? IDS_TOOLTIP_STARRED : IDS_TOOLTIP_STAR)));
// Since StarView is an ImageView, the SetTooltipText changes the accessible
// name. To keep the accessible name unchanged, we need to set the accessible
// name right after we modify the tooltip text for this view.
- SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_STAR));
+ SetAccessibleName(UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_STAR)));
SetImage(ResourceBundle::GetSharedInstance().GetBitmapNamed(
on ? IDR_STAR_LIT : IDR_STAR));
}
diff --git a/chrome/browser/ui/views/notifications/balloon_view.cc b/chrome/browser/ui/views/notifications/balloon_view.cc
index 034e0a0..1a9fced 100644
--- a/chrome/browser/ui/views/notifications/balloon_view.cc
+++ b/chrome/browser/ui/views/notifications/balloon_view.cc
@@ -299,8 +299,8 @@ void BalloonViewImpl::Show(Balloon* balloon) {
options_menu_button_ = new views::MenuButton(NULL, L"", this, false);
AddChildView(options_menu_button_);
close_button_ = new views::ImageButton(this);
- close_button_->SetTooltipText(l10n_util::GetString(
- IDS_NOTIFICATION_BALLOON_DISMISS_LABEL));
+ close_button_->SetTooltipText(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_NOTIFICATION_BALLOON_DISMISS_LABEL)));
AddChildView(close_button_);
// We have to create two windows: one for the contents and one for the
diff --git a/chrome/browser/ui/views/options/advanced_contents_view.cc b/chrome/browser/ui/views/options/advanced_contents_view.cc
index 81261f7..112de2e 100644
--- a/chrome/browser/ui/views/options/advanced_contents_view.cc
+++ b/chrome/browser/ui/views/options/advanced_contents_view.cc
@@ -477,8 +477,8 @@ PrivacySection::PrivacySection(Profile* profile)
enable_safe_browsing_checkbox_(NULL),
reporting_enabled_checkbox_(NULL),
learn_more_link_(NULL),
- AdvancedSection(profile,
- l10n_util::GetString(IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY)) {
+ AdvancedSection(profile, UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY))) {
}
void PrivacySection::ButtonPressed(
@@ -548,31 +548,38 @@ void PrivacySection::InitControlLayout() {
AdvancedSection::InitControlLayout();
content_settings_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_OPTIONS_PRIVACY_CONTENT_SETTINGS_BUTTON));
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_PRIVACY_CONTENT_SETTINGS_BUTTON)));
clear_data_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_OPTIONS_PRIVACY_CLEAR_DATA_BUTTON));
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_PRIVACY_CLEAR_DATA_BUTTON)));
section_description_label_ = new views::Label(
- l10n_util::GetString(IDS_OPTIONS_DISABLE_SERVICES));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_DISABLE_SERVICES)));
enable_link_doctor_checkbox_ = new views::Checkbox(
- l10n_util::GetString(IDS_OPTIONS_LINKDOCTOR_PREF));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_LINKDOCTOR_PREF)));
enable_link_doctor_checkbox_->set_listener(this);
enable_suggest_checkbox_ = new views::Checkbox(
- l10n_util::GetString(IDS_OPTIONS_SUGGEST_PREF));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_SUGGEST_PREF)));
enable_suggest_checkbox_->set_listener(this);
enable_dns_prefetching_checkbox_ = new views::Checkbox(
- l10n_util::GetString(IDS_NETWORK_DNS_PREFETCH_ENABLED_DESCRIPTION));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_NETWORK_DNS_PREFETCH_ENABLED_DESCRIPTION)));
enable_dns_prefetching_checkbox_->set_listener(this);
enable_safe_browsing_checkbox_ = new views::Checkbox(
- l10n_util::GetString(IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION)));
enable_safe_browsing_checkbox_->set_listener(this);
#if defined(GOOGLE_CHROME_BUILD)
reporting_enabled_checkbox_ = new views::Checkbox(
- l10n_util::GetString(IDS_OPTIONS_ENABLE_LOGGING));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_LOGGING));
reporting_enabled_checkbox_->SetMultiLine(true);
reporting_enabled_checkbox_->set_listener(this);
reporting_enabled_checkbox_->SetVisible(true);
#endif
- learn_more_link_ = new views::Link(l10n_util::GetString(IDS_LEARN_MORE));
+ learn_more_link_ = new views::Link(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_LEARN_MORE)));
learn_more_link_->SetController(this);
GridLayout* layout = new GridLayout(contents_);
@@ -702,8 +709,8 @@ WebContentSection::WebContentSection(Profile* profile)
change_content_fonts_button_(NULL),
gears_label_(NULL),
gears_settings_button_(NULL),
- AdvancedSection(profile,
- l10n_util::GetString(IDS_OPTIONS_ADVANCED_SECTION_TITLE_CONTENT)) {
+ AdvancedSection(profile, UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_ADVANCED_SECTION_TITLE_CONTENT))) {
}
void WebContentSection::ButtonPressed(
@@ -723,26 +730,28 @@ void WebContentSection::InitControlLayout() {
AdvancedSection::InitControlLayout();
if (!base::i18n::IsRTL()) {
- gears_label_ = new views::Label(
- l10n_util::GetString(IDS_OPTIONS_GEARSSETTINGS_GROUP_NAME));
+ gears_label_ = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_GEARSSETTINGS_GROUP_NAME)));
} else {
// Add an RTL mark so that
// ":" in "Google Gears:" in Hebrew Chrome is displayed left-most.
- std::wstring gearssetting_group_name =
- l10n_util::GetString(IDS_OPTIONS_GEARSSETTINGS_GROUP_NAME);
+ std::wstring gearssetting_group_name = UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_GEARSSETTINGS_GROUP_NAME));
gearssetting_group_name.push_back(
static_cast<wchar_t>(base::i18n::kRightToLeftMark));
gears_label_ = new views::Label(gearssetting_group_name);
}
gears_settings_button_ = new views::NativeButton(
this,
- l10n_util::GetString(IDS_OPTIONS_GEARSSETTINGS_CONFIGUREGEARS_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_GEARSSETTINGS_CONFIGUREGEARS_BUTTON)));
fonts_and_languages_label_ = new views::Label(
- l10n_util::GetString(IDS_OPTIONS_FONTSETTINGS_INFO));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_FONTSETTINGS_INFO)));
change_content_fonts_button_ = new views::NativeButton(
this,
- l10n_util::GetString(IDS_OPTIONS_FONTSETTINGS_CONFIGUREFONTS_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_FONTSETTINGS_CONFIGUREFONTS_BUTTON)));
GridLayout* layout = new GridLayout(contents_);
contents_->SetLayoutManager(layout);
@@ -803,8 +812,8 @@ SecuritySection::SecuritySection(Profile* profile)
check_for_cert_revocation_checkbox_(NULL),
manage_certificates_label_(NULL),
manage_certificates_button_(NULL),
- AdvancedSection(profile,
- l10n_util::GetString(IDS_OPTIONS_ADVANCED_SECTION_TITLE_SECURITY)) {
+ AdvancedSection(profile, UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_ADVANCED_SECTION_TITLE_SECURITY))) {
}
void SecuritySection::ButtonPressed(
@@ -847,21 +856,23 @@ void SecuritySection::ButtonPressed(
void SecuritySection::InitControlLayout() {
AdvancedSection::InitControlLayout();
- ssl_info_label_ = new views::Label(
- l10n_util::GetString(IDS_OPTIONS_SSL_GROUP_DESCRIPTION));
+ ssl_info_label_ = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_SSL_GROUP_DESCRIPTION)));
enable_ssl3_checkbox_ = new views::Checkbox(
- l10n_util::GetString(IDS_OPTIONS_SSL_USESSL3));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_SSL_USESSL3)));
enable_ssl3_checkbox_->set_listener(this);
enable_tls1_checkbox_ = new views::Checkbox(
- l10n_util::GetString(IDS_OPTIONS_SSL_USETLS1));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_SSL_USETLS1)));
enable_tls1_checkbox_->set_listener(this);
check_for_cert_revocation_checkbox_ = new views::Checkbox(
- l10n_util::GetString(IDS_OPTIONS_SSL_CHECKREVOCATION));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_SSL_CHECKREVOCATION)));
check_for_cert_revocation_checkbox_->set_listener(this);
manage_certificates_label_ = new views::Label(
- l10n_util::GetString(IDS_OPTIONS_CERTIFICATES_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_CERTIFICATES_LABEL)));
manage_certificates_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_OPTIONS_CERTIFICATES_MANAGE_BUTTON));
+ this,
+ UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_CERTIFICATES_MANAGE_BUTTON)));
GridLayout* layout = new GridLayout(contents_);
contents_->SetLayoutManager(layout);
@@ -975,8 +986,8 @@ class NetworkSection : public AdvancedSection,
NetworkSection::NetworkSection(Profile* profile)
: change_proxies_label_(NULL),
change_proxies_button_(NULL),
- AdvancedSection(profile,
- l10n_util::GetString(IDS_OPTIONS_ADVANCED_SECTION_TITLE_NETWORK)) {
+ AdvancedSection(profile, UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_ADVANCED_SECTION_TITLE_NETWORK))) {
}
void NetworkSection::ButtonPressed(
@@ -993,9 +1004,10 @@ void NetworkSection::InitControlLayout() {
AdvancedSection::InitControlLayout();
change_proxies_label_ = new views::Label(
- l10n_util::GetString(IDS_OPTIONS_PROXIES_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_PROXIES_LABEL)));
change_proxies_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON));
+ this, UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON)));
GridLayout* layout = new GridLayout(contents_);
contents_->SetLayoutManager(layout);
@@ -1086,15 +1098,15 @@ DownloadSection::DownloadSection(Profile* profile)
select_file_dialog_(SelectFileDialog::Create(this))),
reset_file_handlers_label_(NULL),
reset_file_handlers_button_(NULL),
- AdvancedSection(profile,
- l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_GROUP_NAME)) {
+ AdvancedSection(profile, UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_DOWNLOADLOCATION_GROUP_NAME))) {
}
void DownloadSection::ButtonPressed(
views::Button* sender, const views::Event& event) {
if (sender == download_browse_button_) {
- const std::wstring dialog_title =
- l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE);
+ const std::wstring dialog_title = UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE));
select_file_dialog_->SelectFile(SelectFileDialog::SELECT_FOLDER,
dialog_title,
profile()->GetPrefs()->GetFilePath(
@@ -1140,20 +1152,25 @@ void DownloadSection::InitControlLayout() {
AdvancedSection::InitControlLayout();
// Layout the download components.
- download_file_location_label_ = new views::Label(
- l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE));
+ download_file_location_label_ = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE)));
download_default_download_location_display_ = new FileDisplayArea;
download_browse_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_BUTTON));
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_BUTTON)));
download_ask_for_save_location_checkbox_ = new views::Checkbox(
- l10n_util::GetString(IDS_OPTIONS_DOWNLOADLOCATION_ASKFORSAVELOCATION));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_DOWNLOADLOCATION_ASKFORSAVELOCATION)));
download_ask_for_save_location_checkbox_->set_listener(this);
download_ask_for_save_location_checkbox_->SetMultiLine(true);
reset_file_handlers_label_ = new views::Label(
- l10n_util::GetString(IDS_OPTIONS_AUTOOPENFILETYPES_INFO));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_AUTOOPENFILETYPES_INFO)));
reset_file_handlers_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_OPTIONS_AUTOOPENFILETYPES_RESETTODEFAULT));
+ this, UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_AUTOOPENFILETYPES_RESETTODEFAULT)));
GridLayout* layout = new GridLayout(contents_);
contents_->SetLayoutManager(layout);
@@ -1252,8 +1269,8 @@ class TranslateSection : public AdvancedSection,
TranslateSection::TranslateSection(Profile* profile)
: enable_translate_checkbox_(NULL),
- AdvancedSection(profile,
- l10n_util::GetString(IDS_OPTIONS_ADVANCED_SECTION_TITLE_TRANSLATE)) {
+ AdvancedSection(profile, UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_ADVANCED_SECTION_TITLE_TRANSLATE))) {
}
void TranslateSection::ButtonPressed(
@@ -1275,8 +1292,8 @@ void TranslateSection::InitControlLayout() {
AddIndentedColumnSet(layout, 0);
- enable_translate_checkbox_ = new views::Checkbox(
- l10n_util::GetString(IDS_OPTIONS_TRANSLATE_ENABLE_TRANSLATE));
+ enable_translate_checkbox_ = new views::Checkbox(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_TRANSLATE_ENABLE_TRANSLATE)));
enable_translate_checkbox_->set_listener(this);
AddWrappingCheckboxRow(layout, enable_translate_checkbox_, 0, false);
@@ -1332,8 +1349,8 @@ CloudPrintProxySection::CloudPrintProxySection(Profile* profile)
manage_printer_button_(NULL),
factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
AdvancedSection(profile,
- l10n_util::GetString(
- IDS_OPTIONS_ADVANCED_SECTION_TITLE_CLOUD_PRINT)) {
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_ADVANCED_SECTION_TITLE_CLOUD_PRINT))) {
}
void CloudPrintProxySection::ButtonPressed(views::Button* sender,
@@ -1350,8 +1367,8 @@ void CloudPrintProxySection::ButtonPressed(views::Button* sender,
// We open a new browser window so the Options dialog doesn't
// get lost behind other windows.
enable_disable_button_->SetEnabled(false);
- enable_disable_button_->SetLabel(
- l10n_util::GetString(IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLING_BUTTON));
+ enable_disable_button_->SetLabel(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLING_BUTTON)));
enable_disable_button_->InvalidateLayout();
Layout();
CloudPrintSetupFlow::OpenDialog(profile(), this,
@@ -1372,8 +1389,8 @@ void CloudPrintProxySection::OnDialogClosed() {
// If the dialog is canceled, the preference won't change, and so we
// have to revert the button text back to the disabled state.
if (!Enabled()) {
- enable_disable_button_->SetLabel(
- l10n_util::GetString(IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_BUTTON));
+ enable_disable_button_->SetLabel(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_BUTTON)));
enable_disable_button_->InvalidateLayout();
Layout();
}
@@ -1383,12 +1400,14 @@ void CloudPrintProxySection::InitControlLayout() {
AdvancedSection::InitControlLayout();
section_description_label_ = new views::Label(
- l10n_util::GetString(IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_LABEL)));
enable_disable_button_ = new views::NativeButton(this,
- l10n_util::GetString(IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_BUTTON)));
manage_printer_button_ = new views::NativeButton(this,
- l10n_util::GetString(
- IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLED_MANAGE_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLED_MANAGE_BUTTON)));
GridLayout* layout = new GridLayout(contents_);
contents_->SetLayoutManager(layout);
@@ -1430,19 +1449,20 @@ void CloudPrintProxySection::NotifyPrefChanged(const std::string* pref_name) {
if (profile()->GetPrefs()->HasPrefPath(prefs::kCloudPrintEmail))
email = profile()->GetPrefs()->GetString(prefs::kCloudPrintEmail);
- section_description_label_->SetText(
- l10n_util::GetStringF(IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLED_LABEL,
- UTF8ToWide(email)));
- enable_disable_button_->SetLabel(
- l10n_util::GetString(IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLED_BUTTON));
+ section_description_label_->SetText(UTF16ToWide(
+ l10n_util::GetStringFUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLED_LABEL,
+ UTF8ToUTF16(email))));
+ enable_disable_button_->SetLabel(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_PROXY_ENABLED_BUTTON)));
enable_disable_button_->InvalidateLayout();
manage_printer_button_->SetVisible(true);
manage_printer_button_->InvalidateLayout();
} else {
- section_description_label_->SetText(
- l10n_util::GetString(IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_LABEL));
- enable_disable_button_->SetLabel(
- l10n_util::GetString(IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_BUTTON));
+ section_description_label_->SetText(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_LABEL)));
+ enable_disable_button_->SetLabel(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_CLOUD_PRINT_PROXY_DISABLED_BUTTON)));
enable_disable_button_->InvalidateLayout();
manage_printer_button_->SetVisible(false);
}
diff --git a/chrome/browser/ui/views/options/advanced_page_view.cc b/chrome/browser/ui/views/options/advanced_page_view.cc
index 287c124..62f8660 100644
--- a/chrome/browser/ui/views/options/advanced_page_view.cc
+++ b/chrome/browser/ui/views/options/advanced_page_view.cc
@@ -7,6 +7,7 @@
#include "app/l10n_util.h"
#include "app/message_box_flags.h"
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/options/options_util.h"
#include "chrome/browser/ui/views/options/advanced_contents_view.h"
@@ -40,9 +41,11 @@ class ResetDefaultsConfirmBox : public views::DialogDelegate {
MessageBoxFlags::DialogButton button) const {
switch (button) {
case MessageBoxFlags::DIALOGBUTTON_OK:
- return l10n_util::GetString(IDS_OPTIONS_RESET_OKLABEL);
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_RESET_OKLABEL));
case MessageBoxFlags::DIALOGBUTTON_CANCEL:
- return l10n_util::GetString(IDS_OPTIONS_RESET_CANCELLABEL);
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_RESET_CANCELLABEL));
default:
break;
}
@@ -50,7 +53,7 @@ class ResetDefaultsConfirmBox : public views::DialogDelegate {
return std::wstring();
}
virtual std::wstring GetWindowTitle() const {
- return l10n_util::GetString(IDS_PRODUCT_NAME);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
}
virtual bool Accept() {
advanced_page_view_->ResetToDefaults();
@@ -69,7 +72,8 @@ class ResetDefaultsConfirmBox : public views::DialogDelegate {
// Also deleted when the window closes.
message_box_view_ = new MessageBoxView(
MessageBoxFlags::kFlagHasMessage | MessageBoxFlags::kFlagHasOKButton,
- l10n_util::GetString(IDS_OPTIONS_RESET_MESSAGE).c_str(),
+ UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_RESET_MESSAGE)).c_str(),
std::wstring(),
dialog_width);
views::Window::CreateChromeWindow(parent_hwnd, gfx::Rect(), this)->Show();
@@ -118,7 +122,7 @@ void AdvancedPageView::ButtonPressed(
void AdvancedPageView::InitControlLayout() {
reset_to_default_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_OPTIONS_RESET));
+ this, UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_RESET)));
advanced_scroll_view_ = new AdvancedScrollViewContainer(profile());
using views::GridLayout;
diff --git a/chrome/browser/ui/views/options/content_filter_page_view.cc b/chrome/browser/ui/views/options/content_filter_page_view.cc
index 3e4ba8d..919ccbb 100644
--- a/chrome/browser/ui/views/options/content_filter_page_view.cc
+++ b/chrome/browser/ui/views/options/content_filter_page_view.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "base/command_line.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/content_settings/content_settings_details.h"
#include "chrome/browser/geolocation/geolocation_content_settings_map.h"
#include "chrome/browser/geolocation/geolocation_exceptions_table_model.h"
@@ -66,7 +67,7 @@ void ContentFilterPageView::InitControlLayout() {
COMPILE_ASSERT(arraysize(kTitleIDs) == CONTENT_SETTINGS_NUM_TYPES,
Need_a_setting_for_every_content_settings_type);
views::Label* title_label = new views::Label(
- l10n_util::GetString(kTitleIDs[content_type_]));
+ UTF16ToWide(l10n_util::GetStringUTF16(kTitleIDs[content_type_])));
title_label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
title_label->SetMultiLine(true);
@@ -87,7 +88,8 @@ void ContentFilterPageView::InitControlLayout() {
Need_a_setting_for_every_content_settings_type);
const int radio_button_group = 0;
allow_radio_ = new views::RadioButton(
- l10n_util::GetString(kAllowIDs[content_type_]), radio_button_group);
+ UTF16ToWide(l10n_util::GetStringUTF16(kAllowIDs[content_type_])),
+ radio_button_group);
allow_radio_->set_listener(this);
allow_radio_->SetMultiLine(true);
layout->StartRow(0, single_column_set_id);
@@ -114,7 +116,7 @@ void ContentFilterPageView::InitControlLayout() {
}
if (askID != 0) {
ask_radio_ = new views::RadioButton(
- l10n_util::GetString(askID), radio_button_group);
+ UTF16ToWide(l10n_util::GetStringUTF16(askID)), radio_button_group);
ask_radio_->set_listener(this);
ask_radio_->SetMultiLine(true);
layout->StartRow(0, single_column_set_id);
@@ -135,7 +137,8 @@ void ContentFilterPageView::InitControlLayout() {
COMPILE_ASSERT(arraysize(kBlockIDs) == CONTENT_SETTINGS_NUM_TYPES,
Need_a_setting_for_every_content_settings_type);
block_radio_ = new views::RadioButton(
- l10n_util::GetString(kBlockIDs[content_type_]), radio_button_group);
+ UTF16ToWide(l10n_util::GetStringUTF16(kBlockIDs[content_type_])),
+ radio_button_group);
block_radio_->set_listener(this);
block_radio_->SetMultiLine(true);
layout->StartRow(0, single_column_set_id);
@@ -143,7 +146,7 @@ void ContentFilterPageView::InitControlLayout() {
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
exceptions_button_ = new views::NativeButton(this,
- l10n_util::GetString(IDS_COOKIES_EXCEPTIONS_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_EXCEPTIONS_BUTTON)));
layout->StartRow(0, single_column_set_id);
layout->AddView(exceptions_button_, 1, 1, GridLayout::LEADING,
diff --git a/chrome/browser/ui/views/options/content_page_view.cc b/chrome/browser/ui/views/options/content_page_view.cc
index 5118834..7bdba35 100644
--- a/chrome/browser/ui/views/options/content_page_view.cc
+++ b/chrome/browser/ui/views/options/content_page_view.cc
@@ -128,11 +128,14 @@ void ContentPageView::ButtonPressed(
ConfirmMessageBoxDialog::RunWithCustomConfiguration(
GetWindow()->GetNativeWindow(),
this,
- l10n_util::GetStringF(IDS_SYNC_STOP_SYNCING_EXPLANATION_LABEL,
- l10n_util::GetString(IDS_PRODUCT_NAME)),
- l10n_util::GetString(IDS_SYNC_STOP_SYNCING_DIALOG_TITLE),
- l10n_util::GetString(IDS_SYNC_STOP_SYNCING_CONFIRM_BUTTON_LABEL),
- l10n_util::GetString(IDS_CANCEL),
+ UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_SYNC_STOP_SYNCING_EXPLANATION_LABEL,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_SYNC_STOP_SYNCING_DIALOG_TITLE)),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_SYNC_STOP_SYNCING_CONFIRM_BUTTON_LABEL)),
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CANCEL)),
gfx::Size(views::Window::GetLocalizedContentsSize(
IDS_CONFIRM_STOP_SYNCING_DIALOG_WIDTH_CHARS,
IDS_CONFIRM_STOP_SYNCING_DIALOG_HEIGHT_LINES)));
@@ -276,17 +279,18 @@ void ContentPageView::OnStateChanged() {
void ContentPageView::InitPasswordSavingGroup() {
passwords_asktosave_radio_ = new views::RadioButton(
- l10n_util::GetString(IDS_OPTIONS_PASSWORDS_ASKTOSAVE),
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_ASKTOSAVE)),
kPasswordSavingRadioGroup);
passwords_asktosave_radio_->set_listener(this);
passwords_asktosave_radio_->SetMultiLine(true);
passwords_neversave_radio_ = new views::RadioButton(
- l10n_util::GetString(IDS_OPTIONS_PASSWORDS_NEVERSAVE),
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_NEVERSAVE)),
kPasswordSavingRadioGroup);
passwords_neversave_radio_->set_listener(this);
passwords_neversave_radio_->SetMultiLine(true);
show_passwords_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_OPTIONS_PASSWORDS_SHOWPASSWORDS));
+ this, UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_SHOWPASSWORDS)));
using views::GridLayout;
using views::ColumnSet;
@@ -312,13 +316,15 @@ void ContentPageView::InitPasswordSavingGroup() {
layout->AddView(show_passwords_button_);
passwords_group_ = new OptionsGroupView(
- contents, l10n_util::GetString(IDS_OPTIONS_PASSWORDS_GROUP_NAME), L"",
+ contents,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_GROUP_NAME)),
+ L"",
true);
}
void ContentPageView::InitFormAutofillGroup() {
change_autofill_settings_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_AUTOFILL_OPTIONS));
+ this, UTF16ToWide(l10n_util::GetStringUTF16(IDS_AUTOFILL_OPTIONS)));
using views::GridLayout;
using views::ColumnSet;
@@ -340,15 +346,17 @@ void ContentPageView::InitFormAutofillGroup() {
layout->AddView(change_autofill_settings_button_);
form_autofill_group_ = new OptionsGroupView(
- contents, l10n_util::GetString(IDS_AUTOFILL_SETTING_WINDOWS_GROUP_NAME),
+ contents,
+ UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_AUTOFILL_SETTING_WINDOWS_GROUP_NAME)),
L"", true);
}
void ContentPageView::InitThemesGroup() {
themes_reset_button_ = new views::NativeButton(this,
- l10n_util::GetString(IDS_THEMES_RESET_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_THEMES_RESET_BUTTON)));
themes_gallery_link_ = new views::Link(
- l10n_util::GetString(IDS_THEMES_GALLERY_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_THEMES_GALLERY_BUTTON)));
themes_gallery_link_->SetController(this);
using views::GridLayout;
@@ -371,13 +379,13 @@ void ContentPageView::InitThemesGroup() {
layout->AddView(themes_gallery_link_);
themes_group_ = new OptionsGroupView(
- contents, l10n_util::GetString(IDS_THEMES_GROUP_NAME),
+ contents, UTF16ToWide(l10n_util::GetStringUTF16(IDS_THEMES_GROUP_NAME)),
L"", false);
}
void ContentPageView::InitBrowsingDataGroup() {
import_button_ = new views::NativeButton(this,
- l10n_util::GetString(IDS_OPTIONS_IMPORT_DATA_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_IMPORT_DATA_BUTTON)));
using views::GridLayout;
using views::ColumnSet;
@@ -395,7 +403,9 @@ void ContentPageView::InitBrowsingDataGroup() {
layout->AddView(import_button_);
browsing_data_group_ = new OptionsGroupView(
- contents, l10n_util::GetString(IDS_OPTIONS_BROWSING_DATA_GROUP_NAME),
+ contents,
+ UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_BROWSING_DATA_GROUP_NAME)),
L"", true);
}
@@ -416,8 +426,8 @@ void ContentPageView::InitSyncGroup() {
privacy_dashboard_link_ = new views::Link();
privacy_dashboard_link_->set_collapse_when_hidden(true);
privacy_dashboard_link_->SetController(this);
- privacy_dashboard_link_->SetText(
- l10n_util::GetString(IDS_SYNC_PRIVACY_DASHBOARD_LINK_LABEL));
+ privacy_dashboard_link_->SetText(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_SYNC_PRIVACY_DASHBOARD_LINK_LABEL)));
sync_start_stop_button_ = new views::NativeButton(this, std::wstring());
sync_customize_button_ = new views::NativeButton(this, std::wstring());
@@ -450,8 +460,10 @@ void ContentPageView::InitSyncGroup() {
layout->StartRow(0, single_column_view_set_id);
layout->AddView(privacy_dashboard_link_, 3, 1);
- sync_group_ = new OptionsGroupView(contents,
- l10n_util::GetString(IDS_SYNC_OPTIONS_GROUP_NAME), std::wstring(), true);
+ sync_group_ = new OptionsGroupView(
+ contents,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_SYNC_OPTIONS_GROUP_NAME)),
+ std::wstring(), true);
}
void ContentPageView::UpdateSyncControls() {
@@ -459,25 +471,26 @@ void ContentPageView::UpdateSyncControls() {
std::wstring status_label;
std::wstring link_label;
std::wstring customize_button_label;
- std::wstring button_label;
+ string16 button_label;
bool managed = sync_service_->IsManaged();
bool sync_setup_completed = sync_service_->HasSyncSetupCompleted();
bool status_has_error = sync_ui_util::GetStatusLabels(sync_service_,
&status_label, &link_label) == sync_ui_util::SYNC_ERROR;
customize_button_label =
- l10n_util::GetString(IDS_SYNC_CUSTOMIZE_BUTTON_LABEL);
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_SYNC_CUSTOMIZE_BUTTON_LABEL));
if (sync_setup_completed) {
- button_label = l10n_util::GetString(IDS_SYNC_STOP_SYNCING_BUTTON_LABEL);
+ button_label =
+ l10n_util::GetStringUTF16(IDS_SYNC_STOP_SYNCING_BUTTON_LABEL);
} else if (sync_service_->SetupInProgress()) {
- button_label = l10n_util::GetString(IDS_SYNC_NTP_SETUP_IN_PROGRESS);
+ button_label = l10n_util::GetStringUTF16(IDS_SYNC_NTP_SETUP_IN_PROGRESS);
} else {
- button_label = l10n_util::GetString(IDS_SYNC_START_SYNC_BUTTON_LABEL);
+ button_label = l10n_util::GetStringUTF16(IDS_SYNC_START_SYNC_BUTTON_LABEL);
}
sync_status_label_->SetText(status_label);
sync_start_stop_button_->SetEnabled(
!sync_service_->WizardIsVisible() && !managed);
- sync_start_stop_button_->SetLabel(button_label);
+ sync_start_stop_button_->SetLabel(UTF16ToWide(button_label));
sync_customize_button_->SetLabel(customize_button_label);
sync_customize_button_->SetVisible(sync_setup_completed && !status_has_error);
sync_customize_button_->SetEnabled(!managed);
diff --git a/chrome/browser/ui/views/options/content_settings_window_view.cc b/chrome/browser/ui/views/options/content_settings_window_view.cc
index ef0e746cf..eeaca4e 100644
--- a/chrome/browser/ui/views/options/content_settings_window_view.cc
+++ b/chrome/browser/ui/views/options/content_settings_window_view.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "base/stl_util-inl.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/views/options/advanced_page_view.h"
@@ -87,7 +88,7 @@ void ContentSettingsWindowView::ShowContentSettingsTab(
// ContentSettingsWindowView, views::DialogDelegate implementation:
std::wstring ContentSettingsWindowView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_CONTENT_SETTINGS_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_CONTENT_SETTINGS_TITLE));
}
void ContentSettingsWindowView::WindowClosing() {
diff --git a/chrome/browser/ui/views/options/cookie_filter_page_view.cc b/chrome/browser/ui/views/options/cookie_filter_page_view.cc
index 7b8db39..055a964 100644
--- a/chrome/browser/ui/views/options/cookie_filter_page_view.cc
+++ b/chrome/browser/ui/views/options/cookie_filter_page_view.cc
@@ -42,8 +42,8 @@ void CookieFilterPageView::InitControlLayout() {
const int single_column_set_id = 0;
layout->AddPaddingRow(0, kUnrelatedControlLargeVerticalSpacing);
- block_3rdparty_check_ = new views::Checkbox(
- l10n_util::GetString(IDS_COOKIES_BLOCK_3RDPARTY_CHKBOX));
+ block_3rdparty_check_ = new views::Checkbox(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COOKIES_BLOCK_3RDPARTY_CHKBOX)));
block_3rdparty_check_->set_listener(this);
layout->StartRow(0, single_column_set_id);
@@ -55,8 +55,8 @@ void CookieFilterPageView::InitControlLayout() {
block_3rdparty_check_->SetChecked(
profile()->GetHostContentSettingsMap()->BlockThirdPartyCookies());
- clear_on_close_check_ = new views::Checkbox(
- l10n_util::GetString(IDS_COOKIES_CLEAR_WHEN_CLOSE_CHKBOX));
+ clear_on_close_check_ = new views::Checkbox(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COOKIES_CLEAR_WHEN_CLOSE_CHKBOX)));
clear_on_close_check_->SetMultiLine(true);
clear_on_close_check_->set_listener(this);
@@ -65,7 +65,7 @@ void CookieFilterPageView::InitControlLayout() {
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
show_cookies_button_ = new views::NativeButton(this,
- l10n_util::GetString(IDS_COOKIES_SHOW_COOKIES_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_SHOW_COOKIES_BUTTON)));
layout->StartRow(0, single_column_set_id);
layout->AddView(show_cookies_button_, 1, 1, GridLayout::LEADING,
@@ -73,7 +73,7 @@ void CookieFilterPageView::InitControlLayout() {
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
views::Link* flash_settings_link = new views::Link(
- l10n_util::GetString(IDS_FLASH_STORAGE_SETTINGS));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FLASH_STORAGE_SETTINGS)));
flash_settings_link->SetController(this);
layout->StartRow(0, single_column_set_id);
@@ -119,6 +119,7 @@ void CookieFilterPageView::ButtonPressed(views::Button* sender,
// CookieFilterPageView, views::LinkController implementation:
void CookieFilterPageView::LinkActivated(views::Link* source, int event_flags) {
- browser::ShowOptionsURL(profile(),
- GURL(l10n_util::GetString(IDS_FLASH_STORAGE_URL)));
+ browser::ShowOptionsURL(
+ profile(),
+ GURL(l10n_util::GetStringUTF8(IDS_FLASH_STORAGE_URL)));
}
diff --git a/chrome/browser/ui/views/options/cookies_view.cc b/chrome/browser/ui/views/options/cookies_view.cc
index ab77d51..973e11b 100644
--- a/chrome/browser/ui/views/options/cookies_view.cc
+++ b/chrome/browser/ui/views/options/cookies_view.cc
@@ -159,7 +159,8 @@ bool CookiesView::HandleKeyEvent(views::Textfield* sender,
// CookiesView, views::DialogDelegate implementation:
std::wstring CookiesView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_COOKIES_WEBSITE_PERMISSIONS_WINDOW_TITLE);
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COOKIES_WEBSITE_PERMISSIONS_WINDOW_TITLE));
}
void CookiesView::WindowClosing() {
@@ -277,14 +278,15 @@ CookiesView::CookiesView(Profile* profile)
void CookiesView::Init() {
search_label_ = new views::Label(
- l10n_util::GetString(IDS_COOKIES_SEARCH_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_SEARCH_LABEL)));
search_field_ = new views::Textfield;
search_field_->SetController(this);
clear_search_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_COOKIES_CLEAR_SEARCH_LABEL));
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_CLEAR_SEARCH_LABEL)));
clear_search_button_->SetEnabled(false);
description_label_ = new views::Label(
- l10n_util::GetString(IDS_COOKIES_INFO_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_INFO_LABEL)));
description_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
cookies_tree_model_.reset(new CookiesTreeModel(
profile_->GetRequestContext()->GetCookieStore()->GetCookieMonster(),
@@ -309,9 +311,11 @@ void CookiesView::Init() {
cookies_tree_ = new CookiesTreeView(cookies_tree_model_.get());
remove_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_COOKIES_REMOVE_LABEL));
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_REMOVE_LABEL)));
remove_all_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_COOKIES_REMOVE_ALL_LABEL));
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_REMOVE_ALL_LABEL)));
using views::GridLayout;
using views::ColumnSet;
diff --git a/chrome/browser/ui/views/options/exception_editor_view.cc b/chrome/browser/ui/views/options/exception_editor_view.cc
index e608269..d5ceaa7 100644
--- a/chrome/browser/ui/views/options/exception_editor_view.cc
+++ b/chrome/browser/ui/views/options/exception_editor_view.cc
@@ -56,8 +56,11 @@ bool ExceptionEditorView::IsModal() const {
}
std::wstring ExceptionEditorView::GetWindowTitle() const {
- return is_new() ? l10n_util::GetString(IDS_EXCEPTION_EDITOR_NEW_TITLE) :
- l10n_util::GetString(IDS_EXCEPTION_EDITOR_TITLE);
+ if (is_new())
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_EXCEPTION_EDITOR_NEW_TITLE));
+
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_EXCEPTION_EDITOR_TITLE));
}
bool ExceptionEditorView::IsDialogButtonEnabled(
@@ -117,7 +120,7 @@ void ExceptionEditorView::Init() {
action_cb_->SetSelectedItem(cb_model_.IndexForSetting(setting_));
incognito_cb_ = new views::Checkbox(
- l10n_util::GetString(IDS_EXCEPTION_EDITOR_OTR_TITLE));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_EXCEPTION_EDITOR_OTR_TITLE)));
incognito_cb_->SetChecked(is_off_the_record_);
GridLayout* layout = CreatePanelGridLayout(this);
@@ -151,7 +154,8 @@ void ExceptionEditorView::Init() {
}
views::Label* ExceptionEditorView::CreateLabel(int message_id) {
- views::Label* label = new views::Label(l10n_util::GetString(message_id));
+ views::Label* label =
+ new views::Label(UTF16ToWide(l10n_util::GetStringUTF16(message_id)));
label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
return label;
}
diff --git a/chrome/browser/ui/views/options/exceptions_page_view.cc b/chrome/browser/ui/views/options/exceptions_page_view.cc
index 42277ec..90c1666 100644
--- a/chrome/browser/ui/views/options/exceptions_page_view.cc
+++ b/chrome/browser/ui/views/options/exceptions_page_view.cc
@@ -69,14 +69,18 @@ ExceptionsPageView::ExceptionsPageView(Profile* profile)
: OptionsPageView(profile),
ALLOW_THIS_IN_INITIALIZER_LIST(show_button_(
this,
- l10n_util::GetString(IDS_PASSWORDS_PAGE_VIEW_SHOW_BUTTON),
- l10n_util::GetString(IDS_PASSWORDS_PAGE_VIEW_HIDE_BUTTON))),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_PASSWORDS_PAGE_VIEW_SHOW_BUTTON)),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_PASSWORDS_PAGE_VIEW_HIDE_BUTTON)))),
ALLOW_THIS_IN_INITIALIZER_LIST(remove_button_(
this,
- l10n_util::GetString(IDS_EXCEPTIONS_PAGE_VIEW_REMOVE_BUTTON))),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_EXCEPTIONS_PAGE_VIEW_REMOVE_BUTTON)))),
ALLOW_THIS_IN_INITIALIZER_LIST(remove_all_button_(
this,
- l10n_util::GetString(IDS_EXCEPTIONS_PAGE_VIEW_REMOVE_ALL_BUTTON))),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_EXCEPTIONS_PAGE_VIEW_REMOVE_ALL_BUTTON)))),
table_model_(profile),
table_view_(NULL) {
}
diff --git a/chrome/browser/ui/views/options/exceptions_view.cc b/chrome/browser/ui/views/options/exceptions_view.cc
index 0a622a1..55de5aa 100644
--- a/chrome/browser/ui/views/options/exceptions_view.cc
+++ b/chrome/browser/ui/views/options/exceptions_view.cc
@@ -8,6 +8,7 @@
#include <vector>
#include "app/l10n_util.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/views/options/content_exceptions_table_view.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -112,15 +113,16 @@ void ExceptionsView::ViewHierarchyChanged(bool is_add,
std::wstring ExceptionsView::GetWindowTitle() const {
switch (model_.content_type()) {
case CONTENT_SETTINGS_TYPE_COOKIES:
- return l10n_util::GetString(IDS_COOKIE_EXCEPTION_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIE_EXCEPTION_TITLE));
case CONTENT_SETTINGS_TYPE_IMAGES:
- return l10n_util::GetString(IDS_IMAGES_EXCEPTION_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMAGES_EXCEPTION_TITLE));
case CONTENT_SETTINGS_TYPE_JAVASCRIPT:
- return l10n_util::GetString(IDS_JS_EXCEPTION_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_JS_EXCEPTION_TITLE));
case CONTENT_SETTINGS_TYPE_PLUGINS:
- return l10n_util::GetString(IDS_PLUGINS_EXCEPTION_TITLE);
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_PLUGINS_EXCEPTION_TITLE));
case CONTENT_SETTINGS_TYPE_POPUPS:
- return l10n_util::GetString(IDS_POPUP_EXCEPTION_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_POPUP_EXCEPTION_TITLE));
default:
NOTREACHED();
}
@@ -177,16 +179,18 @@ void ExceptionsView::Init() {
table_->SetObserver(this);
add_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_EXCEPTIONS_ADD_BUTTON));
+ this, UTF16ToWide(l10n_util::GetStringUTF16(IDS_EXCEPTIONS_ADD_BUTTON)));
add_button_->set_tag(IDS_EXCEPTIONS_ADD_BUTTON);
edit_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_EXCEPTIONS_EDIT_BUTTON));
+ this, UTF16ToWide(l10n_util::GetStringUTF16(IDS_EXCEPTIONS_EDIT_BUTTON)));
edit_button_->set_tag(IDS_EXCEPTIONS_EDIT_BUTTON);
remove_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_EXCEPTIONS_REMOVE_BUTTON));
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_EXCEPTIONS_REMOVE_BUTTON)));
remove_button_->set_tag(IDS_EXCEPTIONS_REMOVE_BUTTON);
remove_all_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_EXCEPTIONS_REMOVEALL_BUTTON));
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_EXCEPTIONS_REMOVEALL_BUTTON)));
remove_all_button_->set_tag(IDS_EXCEPTIONS_REMOVEALL_BUTTON);
View* parent = GetParent();
@@ -212,8 +216,8 @@ void ExceptionsView::Init() {
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
if (allow_off_the_record_) {
- views::Label* label = new views::Label(l10n_util::GetString(
- IDS_EXCEPTIONS_OTR_IN_ITALICS));
+ views::Label* label = new views::Label(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_EXCEPTIONS_OTR_IN_ITALICS)));
label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
layout->StartRow(0, single_column_layout_id);
layout->AddView(label, 1, 1, GridLayout::LEADING, GridLayout::CENTER);
diff --git a/chrome/browser/ui/views/options/fonts_languages_window_view.cc b/chrome/browser/ui/views/options/fonts_languages_window_view.cc
index edf0fa2..79a146b 100644
--- a/chrome/browser/ui/views/options/fonts_languages_window_view.cc
+++ b/chrome/browser/ui/views/options/fonts_languages_window_view.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/views/options/fonts_languages_window_view.h"
#include "app/l10n_util.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/views/options/fonts_page_view.h"
@@ -49,7 +50,8 @@ bool FontsLanguagesWindowView::Accept() {
// FontsLanguagesWindowView, views::WindowDelegate implementation:
std::wstring FontsLanguagesWindowView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_FONT_LANGUAGE_SETTING_WINDOWS_TITLE);
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_FONT_LANGUAGE_SETTING_WINDOWS_TITLE));
}
void FontsLanguagesWindowView::WindowClosing() {
@@ -109,12 +111,12 @@ void FontsLanguagesWindowView::Init() {
AddChildView(tabs_);
fonts_page_ = new FontsPageView(profile_);
- tabs_->AddTab(l10n_util::GetString(
- IDS_FONT_LANGUAGE_SETTING_FONT_TAB_TITLE), fonts_page_);
+ tabs_->AddTab(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FONT_LANGUAGE_SETTING_FONT_TAB_TITLE)), fonts_page_);
languages_page_ = new LanguagesPageView(profile_);
- tabs_->AddTab(l10n_util::GetString(
- IDS_FONT_LANGUAGE_SETTING_LANGUAGES_TAB_TITLE), languages_page_);
+ tabs_->AddTab(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FONT_LANGUAGE_SETTING_LANGUAGES_TAB_TITLE)), languages_page_);
}
void ShowFontsLanguagesWindow(gfx::NativeWindow window,
diff --git a/chrome/browser/ui/views/options/fonts_page_view.cc b/chrome/browser/ui/views/options/fonts_page_view.cc
index ddbc676..b02a27e 100644
--- a/chrome/browser/ui/views/options/fonts_page_view.cc
+++ b/chrome/browser/ui/views/options/fonts_page_view.cc
@@ -267,8 +267,8 @@ void FontsPageView::InitControlLayout() {
column_set->AddColumn(GridLayout::FILL, GridLayout::LEADING, 1,
GridLayout::USE_PREF, 0, 0);
fonts_group_title_ = new views::Label(
- l10n_util::GetString(
- IDS_FONT_LANGUAGE_SETTING_FONT_SUB_DIALOG_FONT_TITLE));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FONT_LANGUAGE_SETTING_FONT_SUB_DIALOG_FONT_TITLE)));
EmbellishTitle(fonts_group_title_);
fonts_group_title_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
layout->StartRow(0, single_column_view_set_id);
@@ -281,8 +281,8 @@ void FontsPageView::InitControlLayout() {
// Encoding group.
encoding_group_title_ = new views::Label(
- l10n_util::GetString(
- IDS_FONT_LANGUAGE_SETTING_FONT_SUB_DIALOG_ENCODING_TITLE));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FONT_LANGUAGE_SETTING_FONT_SUB_DIALOG_ENCODING_TITLE)));
EmbellishTitle(encoding_group_title_);
encoding_group_title_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
layout->StartRow(0, single_column_view_set_id);
@@ -319,36 +319,36 @@ void FontsPageView::InitFontLayout() {
fixed_width_font_display_view_ = new FontDisplayView;
fixed_width_font_change_page_button_ = new views::NativeButton(
this,
- l10n_util::GetString(
- IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_BUTTON_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_BUTTON_LABEL)));
fixed_width_font_label_ = new views::Label(
- l10n_util::GetString(
- IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_FIXED_WIDTH_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_FIXED_WIDTH_LABEL)));
fixed_width_font_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
// Serif font.
serif_font_display_view_ = new FontDisplayView;
serif_font_change_page_button_ = new views::NativeButton(
this,
- l10n_util::GetString(
- IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_BUTTON_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_BUTTON_LABEL)));
serif_font_label_ = new views::Label(
- l10n_util::GetString(
- IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_SERIF_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_SERIF_LABEL)));
serif_font_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
// Sans Serif font.
sans_serif_font_display_view_ = new FontDisplayView;
sans_serif_font_change_page_button_ = new views::NativeButton(
this,
- l10n_util::GetString(
- IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_BUTTON_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_BUTTON_LABEL)));
sans_serif_font_label_ = new views::Label(
- l10n_util::GetString(
- IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_SANS_SERIF_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_SANS_SERIF_LABEL)));
sans_serif_font_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
// Now add the views.
@@ -398,8 +398,8 @@ void FontsPageView::InitFontLayout() {
void FontsPageView::InitEncodingLayout() {
default_encoding_combobox_label_ = new views::Label(
- l10n_util::GetString(
- IDS_FONT_LANGUAGE_SETTING_FONT_DEFAULT_ENCODING_SELECTOR_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FONT_LANGUAGE_SETTING_FONT_DEFAULT_ENCODING_SELECTOR_LABEL)));
default_encoding_combobox_model_.reset(new DefaultEncodingComboboxModel);
default_encoding_combobox_ = new views::Combobox(
default_encoding_combobox_model_.get());
diff --git a/chrome/browser/ui/views/options/general_page_view.cc b/chrome/browser/ui/views/options/general_page_view.cc
index 8aa26d6..a0243cf 100644
--- a/chrome/browser/ui/views/options/general_page_view.cc
+++ b/chrome/browser/ui/views/options/general_page_view.cc
@@ -465,21 +465,21 @@ void GeneralPageView::SetDefaultBrowserUIState(
default_browser_use_as_default_button_->SetEnabled(button_enabled);
default_browser_use_as_default_button_->SetNeedElevation(true);
if (state == ShellIntegration::STATE_IS_DEFAULT) {
- default_browser_status_label_->SetText(
- l10n_util::GetStringF(IDS_OPTIONS_DEFAULTBROWSER_DEFAULT,
- l10n_util::GetString(IDS_PRODUCT_NAME)));
+ default_browser_status_label_->SetText(UTF16ToWide(
+ l10n_util::GetStringFUTF16(IDS_OPTIONS_DEFAULTBROWSER_DEFAULT,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))));
default_browser_status_label_->SetColor(kDefaultBrowserLabelColor);
Layout();
} else if (state == ShellIntegration::STATE_NOT_DEFAULT) {
- default_browser_status_label_->SetText(
- l10n_util::GetStringF(IDS_OPTIONS_DEFAULTBROWSER_NOTDEFAULT,
- l10n_util::GetString(IDS_PRODUCT_NAME)));
+ default_browser_status_label_->SetText(UTF16ToWide(
+ l10n_util::GetStringFUTF16(IDS_OPTIONS_DEFAULTBROWSER_NOTDEFAULT,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))));
default_browser_status_label_->SetColor(kNotDefaultBrowserLabelColor);
Layout();
} else if (state == ShellIntegration::STATE_UNKNOWN) {
- default_browser_status_label_->SetText(
- l10n_util::GetStringF(IDS_OPTIONS_DEFAULTBROWSER_UNKNOWN,
- l10n_util::GetString(IDS_PRODUCT_NAME)));
+ default_browser_status_label_->SetText(UTF16ToWide(
+ l10n_util::GetStringFUTF16(IDS_OPTIONS_DEFAULTBROWSER_UNKNOWN,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))));
default_browser_status_label_->SetColor(kNotDefaultBrowserLabelColor);
Layout();
}
@@ -487,34 +487,38 @@ void GeneralPageView::SetDefaultBrowserUIState(
void GeneralPageView::SetDefaultBrowserUIStateForSxS() {
default_browser_use_as_default_button_->SetEnabled(false);
- default_browser_status_label_->SetText(
- l10n_util::GetStringF(IDS_OPTIONS_DEFAULTBROWSER_SXS,
- l10n_util::GetString(IDS_PRODUCT_NAME)));
+ default_browser_status_label_->SetText(UTF16ToWide(
+ l10n_util::GetStringFUTF16(IDS_OPTIONS_DEFAULTBROWSER_SXS,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))));
default_browser_status_label_->SetColor(kNotDefaultBrowserLabelColor);
Layout();
}
void GeneralPageView::InitStartupGroup() {
- startup_homepage_radio_ = new views::RadioButton(
- l10n_util::GetString(IDS_OPTIONS_STARTUP_SHOW_DEFAULT_AND_NEWTAB),
+ startup_homepage_radio_ = new views::RadioButton(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_SHOW_DEFAULT_AND_NEWTAB)),
kStartupRadioGroup);
startup_homepage_radio_->set_listener(this);
- startup_last_session_radio_ = new views::RadioButton(
- l10n_util::GetString(IDS_OPTIONS_STARTUP_SHOW_LAST_SESSION),
+ startup_last_session_radio_ = new views::RadioButton(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_SHOW_LAST_SESSION)),
kStartupRadioGroup);
startup_last_session_radio_->set_listener(this);
startup_last_session_radio_->SetMultiLine(true);
startup_custom_radio_ = new views::RadioButton(
- l10n_util::GetString(IDS_OPTIONS_STARTUP_SHOW_PAGES),
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_SHOW_PAGES)),
kStartupRadioGroup);
startup_custom_radio_->set_listener(this);
startup_add_custom_page_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_OPTIONS_STARTUP_ADD_BUTTON));
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_ADD_BUTTON)));
startup_remove_custom_page_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_OPTIONS_STARTUP_REMOVE_BUTTON));
+ this,
+ UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_REMOVE_BUTTON)));
startup_remove_custom_page_button_->SetEnabled(false);
startup_use_current_page_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_OPTIONS_STARTUP_USE_CURRENT));
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_USE_CURRENT)));
startup_custom_pages_table_model_.reset(
new CustomHomePagesTableModel(profile()));
@@ -581,18 +585,19 @@ void GeneralPageView::InitStartupGroup() {
layout->AddView(button_stack);
startup_group_ = new OptionsGroupView(
- contents, l10n_util::GetString(IDS_OPTIONS_STARTUP_GROUP_NAME),
+ contents,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_STARTUP_GROUP_NAME)),
std::wstring(), true);
}
void GeneralPageView::InitHomepageGroup() {
homepage_use_newtab_radio_ = new views::RadioButton(
- l10n_util::GetString(IDS_OPTIONS_HOMEPAGE_USE_NEWTAB),
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_HOMEPAGE_USE_NEWTAB)),
kHomePageRadioGroup);
homepage_use_newtab_radio_->set_listener(this);
homepage_use_newtab_radio_->SetMultiLine(true);
homepage_use_url_radio_ = new views::RadioButton(
- l10n_util::GetString(IDS_OPTIONS_HOMEPAGE_USE_URL),
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_HOMEPAGE_USE_URL)),
kHomePageRadioGroup);
homepage_use_url_radio_->set_listener(this);
homepage_use_url_textfield_ = new views::Textfield;
@@ -600,7 +605,7 @@ void GeneralPageView::InitHomepageGroup() {
homepage_use_url_textfield_->set_default_width_in_chars(
kHomePageTextfieldWidthChars);
homepage_show_home_button_checkbox_ = new views::Checkbox(
- l10n_util::GetString(IDS_OPTIONS_HOMEPAGE_SHOW_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_HOMEPAGE_SHOW_BUTTON)));
homepage_show_home_button_checkbox_->set_listener(this);
homepage_show_home_button_checkbox_->SetMultiLine(true);
@@ -637,7 +642,8 @@ void GeneralPageView::InitHomepageGroup() {
GridLayout::FILL, GridLayout::LEADING);
homepage_group_ = new OptionsGroupView(
- contents, l10n_util::GetString(IDS_OPTIONS_HOMEPAGE_GROUP_NAME),
+ contents,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_HOMEPAGE_GROUP_NAME)),
std::wstring(), true);
}
@@ -651,14 +657,16 @@ void GeneralPageView::InitDefaultSearchGroup() {
default_search_manage_engines_button_ = new views::NativeButton(
this,
- l10n_util::GetString(IDS_OPTIONS_DEFAULTSEARCH_MANAGE_ENGINES_LINK));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_OPTIONS_DEFAULTSEARCH_MANAGE_ENGINES_LINK)));
instant_checkbox_ = new views::Checkbox(
- l10n_util::GetString(IDS_INSTANT_PREF));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_INSTANT_PREF)));
instant_checkbox_->SetMultiLine(false);
instant_checkbox_->set_listener(this);
- instant_link_ = new views::Link(l10n_util::GetString(IDS_LEARN_MORE));
+ instant_link_ = new views::Link(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_LEARN_MORE)));
instant_link_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
instant_link_->SetController(this);
@@ -702,12 +710,14 @@ void GeneralPageView::InitDefaultSearchGroup() {
layout->AddPaddingRow(0, 0);
layout->StartRow(0, link_column_set_id);
- layout->AddView(
- new views::Label(l10n_util::GetString(IDS_INSTANT_PREF_WARNING)));
+ layout->AddView(new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_INSTANT_PREF_WARNING))));
layout->AddView(instant_link_);
default_search_group_ = new OptionsGroupView(
- contents, l10n_util::GetString(IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME),
+ contents,
+ UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_DEFAULTSEARCH_GROUP_NAME)),
std::wstring(), true);
}
@@ -718,8 +728,9 @@ void GeneralPageView::InitDefaultBrowserGroup() {
views::Label::ALIGN_LEFT);
default_browser_use_as_default_button_ = new views::NativeButton(
this,
- l10n_util::GetStringF(IDS_OPTIONS_DEFAULTBROWSER_USEASDEFAULT,
- l10n_util::GetString(IDS_PRODUCT_NAME)));
+ UTF16ToWide(
+ l10n_util::GetStringFUTF16(IDS_OPTIONS_DEFAULTBROWSER_USEASDEFAULT,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))));
using views::GridLayout;
using views::ColumnSet;
@@ -741,7 +752,9 @@ void GeneralPageView::InitDefaultBrowserGroup() {
layout->AddView(default_browser_use_as_default_button_);
default_browser_group_ = new OptionsGroupView(
- contents, l10n_util::GetString(IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME),
+ contents,
+ UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_DEFAULTBROWSER_GROUP_NAME)),
std::wstring(), false);
if (BrowserDistribution::GetDistribution()->CanSetAsDefault())
diff --git a/chrome/browser/ui/views/options/languages_page_view.cc b/chrome/browser/ui/views/options/languages_page_view.cc
index 9abe7c4..afe1e84 100644
--- a/chrome/browser/ui/views/options/languages_page_view.cc
+++ b/chrome/browser/ui/views/options/languages_page_view.cc
@@ -115,7 +115,8 @@ AddLanguageWindowView::AddLanguageWindowView(
}
std::wstring AddLanguageWindowView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_FONT_LANGUAGE_SETTING_LANGUAGES_TAB_TITLE);
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_FONT_LANGUAGE_SETTING_LANGUAGES_TAB_TITLE));
}
bool AddLanguageWindowView::Accept() {
@@ -240,16 +241,24 @@ void LanguagesPageView::OnAddLanguage(const std::string& new_language) {
void LanguagesPageView::InitControlLayout() {
// Define the buttons.
- add_button_ = new views::NativeButton(this, l10n_util::GetString(
- IDS_FONT_LANGUAGE_SETTING_LANGUAGES_SELECTOR_ADD_BUTTON_LABEL));
- remove_button_ = new views::NativeButton(this, l10n_util::GetString(
- IDS_FONT_LANGUAGE_SETTING_LANGUAGES_SELECTOR_REMOVE_BUTTON_LABEL));
+ add_button_ = new views::NativeButton(
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FONT_LANGUAGE_SETTING_LANGUAGES_SELECTOR_ADD_BUTTON_LABEL)));
+ remove_button_ = new views::NativeButton(
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FONT_LANGUAGE_SETTING_LANGUAGES_SELECTOR_REMOVE_BUTTON_LABEL)));
remove_button_->SetEnabled(false);
- move_up_button_ = new views::NativeButton(this, l10n_util::GetString(
- IDS_FONT_LANGUAGE_SETTING_LANGUAGES_SELECTOR_MOVEUP_BUTTON_LABEL));
+ move_up_button_ = new views::NativeButton(
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FONT_LANGUAGE_SETTING_LANGUAGES_SELECTOR_MOVEUP_BUTTON_LABEL)));
move_up_button_->SetEnabled(false);
- move_down_button_ = new views::NativeButton(this, l10n_util::GetString(
- IDS_FONT_LANGUAGE_SETTING_LANGUAGES_SELECTOR_MOVEDOWN_BUTTON_LABEL));
+ move_down_button_ = new views::NativeButton(
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FONT_LANGUAGE_SETTING_LANGUAGES_SELECTOR_MOVEDOWN_BUTTON_LABEL)));
move_down_button_->SetEnabled(false);
languages_contents_ = new views::View;
@@ -266,8 +275,8 @@ void LanguagesPageView::InitControlLayout() {
column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1,
GridLayout::USE_PREF, 0, 0);
languages_instructions_ = new views::Label(
- l10n_util::GetString(
- IDS_FONT_LANGUAGE_SETTING_LANGUAGES_INSTRUCTIONS));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FONT_LANGUAGE_SETTING_LANGUAGES_INSTRUCTIONS)));
languages_instructions_->SetMultiLine(true);
languages_instructions_->SetHorizontalAlignment(
views::Label::ALIGN_LEFT);
@@ -326,25 +335,25 @@ void LanguagesPageView::InitControlLayout() {
layout->AddPaddingRow(0, kUnrelatedControlVerticalSpacing);
language_info_label_ = new views::Label(
- l10n_util::GetString(IDS_OPTIONS_CHROME_LANGUAGE_INFO));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_CHROME_LANGUAGE_INFO)));
language_info_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
ui_language_label_ = new views::Label(
- l10n_util::GetString(IDS_OPTIONS_CHROME_UI_LANGUAGE));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_CHROME_UI_LANGUAGE)));
ui_language_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
ui_language_model_.reset(new LanguageComboboxModel);
change_ui_language_combobox_ =
new views::Combobox(ui_language_model_.get());
change_ui_language_combobox_->set_listener(this);
- dictionary_language_label_ = new views::Label(
- l10n_util::GetString(IDS_OPTIONS_CHROME_DICTIONARY_LANGUAGE));
+ dictionary_language_label_ = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_CHROME_DICTIONARY_LANGUAGE)));
dictionary_language_label_->SetHorizontalAlignment(
views::Label::ALIGN_LEFT);
enable_spellchecking_checkbox_ = new views::Checkbox(
- l10n_util::GetString(IDS_OPTIONS_ENABLE_SPELLCHECK));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_SPELLCHECK)));
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kExperimentalSpellcheckerFeatures)) {
- enable_autospellcorrect_checkbox_ = new views::Checkbox(
- l10n_util::GetString(IDS_OPTIONS_ENABLE_AUTO_SPELL_CORRECTION));
+ enable_autospellcorrect_checkbox_ = new views::Checkbox(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_ENABLE_AUTO_SPELL_CORRECTION)));
enable_autospellcorrect_checkbox_->set_listener(this);
}
enable_spellchecking_checkbox_->set_listener(this);
diff --git a/chrome/browser/ui/views/options/options_group_view.cc b/chrome/browser/ui/views/options/options_group_view.cc
index ef3e5dd..70f88b8 100644
--- a/chrome/browser/ui/views/options/options_group_view.cc
+++ b/chrome/browser/ui/views/options/options_group_view.cc
@@ -9,6 +9,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "base/string_number_conversions.h"
#include "gfx/canvas.h"
#include "gfx/font.h"
#include "gfx/native_theme_win.h"
@@ -103,10 +104,11 @@ void OptionsGroupView::Init() {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
const gfx::Font& font = rb.GetFont(ResourceBundle::BaseFont);
- std::wstring left_column_chars =
- l10n_util::GetString(IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS);
- int left_column_width =
- font.GetExpectedTextWidth(_wtoi(left_column_chars.c_str()));
+ int left_column_chars = 0;
+ base::StringToInt(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_DIALOG_LEFT_COLUMN_WIDTH_CHARS),
+ &left_column_chars);
+ int left_column_width = font.GetExpectedTextWidth(left_column_chars);
const int two_column_layout_id = 0;
ColumnSet* column_set = layout->AddColumnSet(two_column_layout_id);
diff --git a/chrome/browser/ui/views/options/options_window_view.cc b/chrome/browser/ui/views/options/options_window_view.cc
index ae7f545..e2940d6 100644
--- a/chrome/browser/ui/views/options/options_window_view.cc
+++ b/chrome/browser/ui/views/options/options_window_view.cc
@@ -127,8 +127,9 @@ void OptionsWindowView::ShowOptionsPage(OptionsPage page,
// OptionsWindowView, views::DialogDelegate implementation:
std::wstring OptionsWindowView::GetWindowTitle() const {
- return l10n_util::GetStringF(IDS_OPTIONS_DIALOG_TITLE,
- l10n_util::GetString(IDS_PRODUCT_NAME));
+ return UTF16ToWide(
+ l10n_util::GetStringFUTF16(IDS_OPTIONS_DIALOG_TITLE,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
}
std::wstring OptionsWindowView::GetWindowName() const {
@@ -196,26 +197,30 @@ void OptionsWindowView::ViewHierarchyChanged(bool is_add,
void OptionsWindowView::Init() {
tabs_ = new views::TabbedPane;
- tabs_->SetAccessibleName(l10n_util::GetStringF(IDS_OPTIONS_DIALOG_TITLE,
- l10n_util::GetString(IDS_PRODUCT_NAME)));
+ tabs_->SetAccessibleName(UTF16ToWide(
+ l10n_util::GetStringFUTF16(IDS_OPTIONS_DIALOG_TITLE,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))));
tabs_->SetListener(this);
AddChildView(tabs_);
int tab_index = 0;
GeneralPageView* general_page = new GeneralPageView(profile_);
- tabs_->AddTabAtIndex(tab_index++,
- l10n_util::GetString(IDS_OPTIONS_GENERAL_TAB_LABEL),
- general_page, false);
+ tabs_->AddTabAtIndex(
+ tab_index++,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_GENERAL_TAB_LABEL)),
+ general_page, false);
ContentPageView* content_page = new ContentPageView(profile_);
- tabs_->AddTabAtIndex(tab_index++,
- l10n_util::GetString(IDS_OPTIONS_CONTENT_TAB_LABEL),
- content_page, false);
+ tabs_->AddTabAtIndex(
+ tab_index++,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_CONTENT_TAB_LABEL)),
+ content_page, false);
AdvancedPageView* advanced_page = new AdvancedPageView(profile_);
- tabs_->AddTabAtIndex(tab_index++,
- l10n_util::GetString(IDS_OPTIONS_ADVANCED_TAB_LABEL),
- advanced_page, false);
+ tabs_->AddTabAtIndex(
+ tab_index++,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_ADVANCED_TAB_LABEL)),
+ advanced_page, false);
DCHECK(tabs_->GetTabCount() == OPTIONS_PAGE_COUNT);
}
diff --git a/chrome/browser/ui/views/options/passwords_exceptions_window_view.cc b/chrome/browser/ui/views/options/passwords_exceptions_window_view.cc
index 5c786ac..c9f5c73 100644
--- a/chrome/browser/ui/views/options/passwords_exceptions_window_view.cc
+++ b/chrome/browser/ui/views/options/passwords_exceptions_window_view.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/views/options/passwords_exceptions_window_view.h"
#include "app/l10n_util.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/views/options/passwords_page_view.h"
#include "chrome/browser/views/options/exceptions_page_view.h"
#include "grit/generated_resources.h"
@@ -81,7 +82,8 @@ int PasswordsExceptionsWindowView::GetDialogButtons() const {
}
std::wstring PasswordsExceptionsWindowView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_PASSWORDS_EXCEPTIONS_WINDOW_TITLE);
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_PASSWORDS_EXCEPTIONS_WINDOW_TITLE));
}
void PasswordsExceptionsWindowView::WindowClosing() {
@@ -102,10 +104,10 @@ void PasswordsExceptionsWindowView::Init() {
AddChildView(tabs_);
passwords_page_view_ = new PasswordsPageView(profile_);
- tabs_->AddTab(l10n_util::GetString(
- IDS_PASSWORDS_SHOW_PASSWORDS_TAB_TITLE), passwords_page_view_);
+ tabs_->AddTab(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_PASSWORDS_SHOW_PASSWORDS_TAB_TITLE)), passwords_page_view_);
exceptions_page_view_ = new ExceptionsPageView(profile_);
- tabs_->AddTab(l10n_util::GetString(
- IDS_PASSWORDS_EXCEPTIONS_TAB_TITLE), exceptions_page_view_);
+ tabs_->AddTab(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_PASSWORDS_EXCEPTIONS_TAB_TITLE)), exceptions_page_view_);
}
diff --git a/chrome/browser/ui/views/options/passwords_page_view.cc b/chrome/browser/ui/views/options/passwords_page_view.cc
index ec69c13..8e30879 100644
--- a/chrome/browser/ui/views/options/passwords_page_view.cc
+++ b/chrome/browser/ui/views/options/passwords_page_view.cc
@@ -176,14 +176,18 @@ PasswordsPageView::PasswordsPageView(Profile* profile)
: OptionsPageView(profile),
ALLOW_THIS_IN_INITIALIZER_LIST(show_button_(
this,
- l10n_util::GetString(IDS_PASSWORDS_PAGE_VIEW_SHOW_BUTTON),
- l10n_util::GetString(IDS_PASSWORDS_PAGE_VIEW_HIDE_BUTTON))),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_PASSWORDS_PAGE_VIEW_SHOW_BUTTON)),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_PASSWORDS_PAGE_VIEW_HIDE_BUTTON)))),
ALLOW_THIS_IN_INITIALIZER_LIST(remove_button_(
this,
- l10n_util::GetString(IDS_PASSWORDS_PAGE_VIEW_REMOVE_BUTTON))),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_PASSWORDS_PAGE_VIEW_REMOVE_BUTTON)))),
ALLOW_THIS_IN_INITIALIZER_LIST(remove_all_button_(
this,
- l10n_util::GetString(IDS_PASSWORDS_PAGE_VIEW_REMOVE_ALL_BUTTON))),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_PASSWORDS_PAGE_VIEW_REMOVE_ALL_BUTTON)))),
table_model_(profile),
table_view_(NULL),
current_selected_password_(NULL) {
@@ -211,8 +215,8 @@ void PasswordsPageView::OnSelectionChanged() {
if (selected != current_selected_password_) {
// Reset the password related views.
- show_button_.SetLabel(
- l10n_util::GetString(IDS_PASSWORDS_PAGE_VIEW_SHOW_BUTTON));
+ show_button_.SetLabel(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_PASSWORDS_PAGE_VIEW_SHOW_BUTTON)));
show_button_.SetEnabled(has_selection);
password_label_.SetText(std::wstring());
@@ -227,9 +231,10 @@ void PasswordsPageView::ButtonPressed(
ConfirmMessageBoxDialog::Run(
GetWindow()->GetNativeWindow(),
this,
- l10n_util::GetString(IDS_PASSWORDS_PAGE_VIEW_TEXT_DELETE_ALL_PASSWORDS),
- l10n_util::GetString(
- IDS_PASSWORDS_PAGE_VIEW_CAPTION_DELETE_ALL_PASSWORDS));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_PASSWORDS_PAGE_VIEW_TEXT_DELETE_ALL_PASSWORDS)),
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_PASSWORDS_PAGE_VIEW_CAPTION_DELETE_ALL_PASSWORDS)));
return;
}
@@ -246,8 +251,8 @@ void PasswordsPageView::ButtonPressed(
if (password_label_.GetText().length() == 0 &&
allow_show_passwords_.GetValue()) {
password_label_.SetText(selected->password_value);
- show_button_.SetLabel(
- l10n_util::GetString(IDS_PASSWORDS_PAGE_VIEW_HIDE_BUTTON));
+ show_button_.SetLabel(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_PASSWORDS_PAGE_VIEW_HIDE_BUTTON)));
} else {
HidePassword();
}
@@ -348,8 +353,8 @@ void PasswordsPageView::SetupTable() {
void PasswordsPageView::HidePassword() {
password_label_.SetText(L"");
- show_button_.SetLabel(
- l10n_util::GetString(IDS_PASSWORDS_PAGE_VIEW_SHOW_BUTTON));
+ show_button_.SetLabel(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_PASSWORDS_PAGE_VIEW_SHOW_BUTTON)));
}
void PasswordsPageView::NotifyPrefChanged(const std::string* pref_name) {
diff --git a/chrome/browser/ui/views/options/plugin_filter_page_view.cc b/chrome/browser/ui/views/options/plugin_filter_page_view.cc
index 94ae40d..b527960 100644
--- a/chrome/browser/ui/views/options/plugin_filter_page_view.cc
+++ b/chrome/browser/ui/views/options/plugin_filter_page_view.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/views/options/plugin_filter_page_view.h"
#include "app/l10n_util.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/options/show_options_url.h"
#include "chrome/common/url_constants.h"
@@ -32,7 +33,7 @@ void PluginFilterPageView::InitControlLayout() {
layout->AddPaddingRow(0, kUnrelatedControlVerticalSpacing);
views::Link* plugins_page_link = new views::Link(
- l10n_util::GetString(IDS_PLUGIN_SELECTIVE_DISABLE));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_PLUGIN_SELECTIVE_DISABLE)));
plugins_page_link->SetController(this);
layout->StartRow(0, single_column_set_id);
diff --git a/chrome/browser/ui/views/options/simple_content_exceptions_view.cc b/chrome/browser/ui/views/options/simple_content_exceptions_view.cc
index 5df84aa..51be466 100644
--- a/chrome/browser/ui/views/options/simple_content_exceptions_view.cc
+++ b/chrome/browser/ui/views/options/simple_content_exceptions_view.cc
@@ -8,6 +8,7 @@
#include <vector>
#include "app/l10n_util.h"
+#include "base/utf_string_conversions.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "gfx/rect.h"
@@ -96,7 +97,7 @@ void SimpleContentExceptionsView::ViewHierarchyChanged(bool is_add,
}
std::wstring SimpleContentExceptionsView::GetWindowTitle() const {
- return l10n_util::GetString(title_message_id_);
+ return UTF16ToWide(l10n_util::GetStringUTF16(title_message_id_));
}
SimpleContentExceptionsView::SimpleContentExceptionsView(
@@ -131,10 +132,12 @@ void SimpleContentExceptionsView::Init() {
table_->SetObserver(this);
remove_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_EXCEPTIONS_REMOVE_BUTTON));
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_EXCEPTIONS_REMOVE_BUTTON)));
remove_button_->set_tag(IDS_EXCEPTIONS_REMOVE_BUTTON);
remove_all_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_EXCEPTIONS_REMOVEALL_BUTTON));
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_EXCEPTIONS_REMOVEALL_BUTTON)));
remove_all_button_->set_tag(IDS_EXCEPTIONS_REMOVEALL_BUTTON);
View* parent = GetParent();
diff --git a/chrome/browser/ui/views/restart_message_box.cc b/chrome/browser/ui/views/restart_message_box.cc
index c054098..4e2804d 100644
--- a/chrome/browser/ui/views/restart_message_box.cc
+++ b/chrome/browser/ui/views/restart_message_box.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "app/message_box_flags.h"
+#include "base/utf_string_conversions.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "views/controls/message_box_view.h"
@@ -27,11 +28,11 @@ int RestartMessageBox::GetDialogButtons() const {
std::wstring RestartMessageBox::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
DCHECK(button == MessageBoxFlags::DIALOGBUTTON_OK);
- return l10n_util::GetString(IDS_OK);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_OK));
}
std::wstring RestartMessageBox::GetWindowTitle() const {
- return l10n_util::GetString(IDS_PRODUCT_NAME);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
}
void RestartMessageBox::DeleteDelegate() {
@@ -54,7 +55,8 @@ RestartMessageBox::RestartMessageBox(gfx::NativeWindow parent_window) {
// Also deleted when the window closes.
message_box_view_ = new MessageBoxView(
MessageBoxFlags::kFlagHasMessage | MessageBoxFlags::kFlagHasOKButton,
- l10n_util::GetString(IDS_OPTIONS_RESTART_REQUIRED).c_str(),
+ UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_OPTIONS_RESTART_REQUIRED)).c_str(),
std::wstring(),
kDialogWidth);
views::Window::CreateChromeWindow(parent_window, gfx::Rect(), this)->Show();
diff --git a/chrome/browser/ui/views/sad_tab_view.cc b/chrome/browser/ui/views/sad_tab_view.cc
index 7dbdb71..876f9ed 100644
--- a/chrome/browser/ui/views/sad_tab_view.cc
+++ b/chrome/browser/ui/views/sad_tab_view.cc
@@ -56,7 +56,8 @@ SadTabView::SadTabView(TabContents* tab_contents)
InitClass();
if (tab_contents != NULL) {
- learn_more_link_ = new views::Link(l10n_util::GetString(IDS_LEARN_MORE));
+ learn_more_link_ =
+ new views::Link(UTF16ToWide(l10n_util::GetStringUTF16(IDS_LEARN_MORE)));
learn_more_link_->SetFont(*message_font_);
learn_more_link_->SetNormalColor(kLinkColor);
learn_more_link_->SetController(this);
@@ -149,9 +150,9 @@ void SadTabView::InitClass() {
rb.GetFont(ResourceBundle::BaseFont).DeriveFont(kMessageFontSizeDelta));
sad_tab_bitmap_ = rb.GetBitmapNamed(IDR_SAD_TAB);
- title_ = l10n_util::GetString(IDS_SAD_TAB_TITLE);
+ title_ = UTF16ToWide(l10n_util::GetStringUTF16(IDS_SAD_TAB_TITLE));
title_width_ = title_font_->GetStringWidth(WideToUTF16Hack(title_));
- message_ = l10n_util::GetString(IDS_SAD_TAB_MESSAGE);
+ message_ = UTF16ToWide(l10n_util::GetStringUTF16(IDS_SAD_TAB_MESSAGE));
initialized = true;
}
diff --git a/chrome/browser/ui/views/tabs/base_tab.cc b/chrome/browser/ui/views/tabs/base_tab.cc
index 4598a8b..52801bd 100644
--- a/chrome/browser/ui/views/tabs/base_tab.cc
+++ b/chrome/browser/ui/views/tabs/base_tab.cc
@@ -138,8 +138,10 @@ BaseTab::BaseTab(TabController* controller)
rb.GetBitmapNamed(IDR_TAB_CLOSE_H));
close_button_->SetImage(views::CustomButton::BS_PUSHED,
rb.GetBitmapNamed(IDR_TAB_CLOSE_P));
- close_button_->SetTooltipText(l10n_util::GetString(IDS_TOOLTIP_CLOSE_TAB));
- close_button_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_CLOSE));
+ close_button_->SetTooltipText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_TOOLTIP_CLOSE_TAB)));
+ close_button_->SetAccessibleName(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)));
// Disable animation so that the red danger sign shows up immediately
// to help avoid mis-clicks.
close_button_->SetAnimationDuration(0);
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index a4430ef..64bc896 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -10,6 +10,7 @@
#include "app/resource_bundle.h"
#include "base/compiler_specific.h"
#include "base/stl_util-inl.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/defaults.h"
#include "chrome/browser/themes/browser_theme_provider.h"
#include "chrome/browser/ui/browser.h"
@@ -147,7 +148,8 @@ void TabStrip::InitTabStripButtons() {
views::ImageButton::ALIGN_BOTTOM);
}
LoadNewTabButtonImage();
- newtab_button_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_NEWTAB));
+ newtab_button_->SetAccessibleName(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_NEWTAB)));
AddChildView(newtab_button_);
}
diff --git a/chrome/browser/ui/views/task_manager_view.cc b/chrome/browser/ui/views/task_manager_view.cc
index 79e6cbe..a80d6de 100644
--- a/chrome/browser/ui/views/task_manager_view.cc
+++ b/chrome/browser/ui/views/task_manager_view.cc
@@ -380,15 +380,15 @@ void TaskManagerView::Init() {
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kPurgeMemoryButton)) {
purge_memory_button_ = new views::NativeButton(this,
- l10n_util::GetString(IDS_TASK_MANAGER_PURGE_MEMORY));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_TASK_MANAGER_PURGE_MEMORY)));
}
kill_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_TASK_MANAGER_KILL));
+ this, UTF16ToWide(l10n_util::GetStringUTF16(IDS_TASK_MANAGER_KILL)));
kill_button_->AddAccelerator(views::Accelerator(app::VKEY_E,
false, false, false));
kill_button_->SetAccessibleKeyboardShortcut(L"E");
- about_memory_link_ = new views::Link(
- l10n_util::GetString(IDS_TASK_MANAGER_ABOUT_MEMORY_LINK));
+ about_memory_link_ = new views::Link(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_TASK_MANAGER_ABOUT_MEMORY_LINK)));
about_memory_link_->SetController(this);
// Makes sure our state is consistent.
@@ -561,7 +561,7 @@ bool TaskManagerView::ExecuteWindowsCommand(int command_id) {
}
std::wstring TaskManagerView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_TASK_MANAGER_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_TASK_MANAGER_TITLE));
}
std::wstring TaskManagerView::GetWindowName() const {
@@ -619,7 +619,7 @@ void TaskManagerView::ShowContextMenu(views::View* source,
this, views::Menu::TOPLEFT, source->GetWidget()->GetNativeView()));
for (std::vector<TableColumn>::iterator i =
columns_.begin(); i != columns_.end(); ++i) {
- menu->AppendMenuItem(i->id, l10n_util::GetString(i->id),
+ menu->AppendMenuItem(i->id, l10n_util::GetStringUTF16(i->id),
views::Menu::CHECKBOX);
}
menu->RunMenuAt(p.x(), p.y());
@@ -652,7 +652,8 @@ void TaskManagerView::ActivateFocusedTab() {
void TaskManagerView::AddAlwaysOnTopSystemMenuItem() {
// The Win32 API requires that we own the text.
- always_on_top_menu_text_ = l10n_util::GetString(IDS_ALWAYS_ON_TOP);
+ always_on_top_menu_text_ =
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ALWAYS_ON_TOP));
// Let's insert a menu to the window.
HMENU system_menu = ::GetSystemMenu(GetWindow()->GetNativeWindow(), FALSE);