summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-06 21:39:37 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-06 21:39:37 +0000
commit7c1b7b42a72c34b0c2b4e1fff800f0ce534927e7 (patch)
treea06f67fb573152e5d9f4b8272b3390618586e28b
parentec982fafef4ffe5605a11ebede334c4aa0ada852 (diff)
downloadchromium_src-7c1b7b42a72c34b0c2b4e1fff800f0ce534927e7.zip
chromium_src-7c1b7b42a72c34b0c2b4e1fff800f0ce534927e7.tar.gz
chromium_src-7c1b7b42a72c34b0c2b4e1fff800f0ce534927e7.tar.bz2
Remove wstring from l10n_util. Part 7.
BUG=9911 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6088008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70654 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/views/about_chrome_view.cc29
-rw-r--r--chrome/browser/ui/views/autofill_profiles_view_win.cc37
-rw-r--r--chrome/browser/ui/views/clear_browsing_data_view.cc35
-rw-r--r--chrome/browser/ui/views/clear_server_data.cc37
-rw-r--r--chrome/browser/ui/views/collected_cookies_win.cc40
-rw-r--r--chrome/browser/ui/views/confirm_message_box_dialog.cc9
-rw-r--r--chrome/browser/ui/views/cookie_info_view.cc29
-rw-r--r--chrome/browser/ui/views/database_info_view.cc14
-rw-r--r--chrome/browser/ui/views/default_search_view.cc12
-rw-r--r--chrome/browser/ui/views/first_run_bubble.cc36
-rw-r--r--chrome/browser/ui/views/first_run_search_engine_view.cc16
-rw-r--r--chrome/browser/ui/views/generic_info_view.cc5
-rw-r--r--chrome/browser/ui/views/hung_renderer_view.cc12
-rw-r--r--chrome/browser/ui/views/importer_lock_view.cc9
-rw-r--r--chrome/browser/ui/views/importer_view.cc38
-rw-r--r--chrome/browser/ui/views/importing_progress_view.cc32
-rw-r--r--chrome/browser/ui/views/indexed_db_info_view.cc15
-rw-r--r--chrome/browser/ui/views/keyword_editor_view.cc18
-rw-r--r--chrome/browser/ui/views/local_storage_info_view.cc15
-rw-r--r--chrome/browser/ui/views/local_storage_set_item_info_view.cc15
-rw-r--r--chrome/browser/ui/views/login_view.cc9
-rw-r--r--chrome/browser/ui/views/page_info_bubble_view.cc6
-rw-r--r--chrome/browser/ui/views/reload_button.cc6
-rw-r--r--chrome/browser/ui/views/repost_form_warning_view.cc9
-rw-r--r--chrome/browser/ui/views/shell_dialogs_win.cc9
-rw-r--r--chrome/browser/ui/views/ssl_client_certificate_selector_win.cc7
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc44
-rw-r--r--chrome/browser/ui/views/uninstall_view.cc13
-rw-r--r--chrome/browser/ui/views/update_recommended_message_box.cc15
-rw-r--r--chrome/browser/ui/views/url_picker.cc9
-rw-r--r--chrome/browser/ui/views/user_data_dir_dialog.cc20
-rw-r--r--chrome/browser/ui/views/wrench_menu.cc21
32 files changed, 351 insertions, 270 deletions
diff --git a/chrome/browser/ui/views/about_chrome_view.cc b/chrome/browser/ui/views/about_chrome_view.cc
index 1012bb6..25a81ab 100644
--- a/chrome/browser/ui/views/about_chrome_view.cc
+++ b/chrome/browser/ui/views/about_chrome_view.cc
@@ -719,13 +719,15 @@ void AboutChromeView::UpdateStatus(GoogleUpdateUpgradeResult result,
case UPGRADE_STARTED:
UserMetrics::RecordAction(UserMetricsAction("Upgrade_Started"), profile_);
show_throbber = true;
- update_label_.SetText(l10n_util::GetString(IDS_UPGRADE_STARTED));
+ update_label_.SetText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_UPGRADE_STARTED)));
break;
case UPGRADE_CHECK_STARTED:
UserMetrics::RecordAction(UserMetricsAction("UpgradeCheck_Started"),
profile_);
show_throbber = true;
- update_label_.SetText(l10n_util::GetString(IDS_UPGRADE_CHECK_STARTED));
+ update_label_.SetText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_UPGRADE_CHECK_STARTED)));
break;
case UPGRADE_IS_AVAILABLE:
UserMetrics::RecordAction(
@@ -760,14 +762,14 @@ void AboutChromeView::UpdateStatus(GoogleUpdateUpgradeResult result,
UserMetrics::RecordAction(
UserMetricsAction("UpgradeCheck_AlreadyUpToDate"), profile_);
#if defined(OS_CHROMEOS)
- std::wstring update_label_text =
- l10n_util::GetStringF(IDS_UPGRADE_ALREADY_UP_TO_DATE,
- l10n_util::GetString(IDS_PRODUCT_NAME));
+ std::wstring update_label_text = UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_UPGRADE_ALREADY_UP_TO_DATE,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
#else
- std::wstring update_label_text =
- l10n_util::GetStringF(IDS_UPGRADE_ALREADY_UP_TO_DATE,
- l10n_util::GetString(IDS_PRODUCT_NAME),
- ASCIIToUTF16(current_version_));
+ std::wstring update_label_text = l10n_util::GetStringFUTF16(
+ IDS_UPGRADE_ALREADY_UP_TO_DATE,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
+ ASCIIToUTF16(current_version_));
#endif
if (base::i18n::IsRTL()) {
update_label_text.push_back(
@@ -790,8 +792,9 @@ void AboutChromeView::UpdateStatus(GoogleUpdateUpgradeResult result,
profile_);
restart_button_visible_ = true;
const std::wstring& update_string =
- l10n_util::GetStringF(IDS_UPGRADE_SUCCESSFUL_RESTART,
- l10n_util::GetString(IDS_PRODUCT_NAME));
+ UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_UPGRADE_SUCCESSFUL_RESTART,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
update_label_.SetText(update_string);
show_success_indicator = true;
break;
@@ -800,8 +803,8 @@ void AboutChromeView::UpdateStatus(GoogleUpdateUpgradeResult result,
UserMetrics::RecordAction(UserMetricsAction("UpgradeCheck_Error"),
profile_);
restart_button_visible_ = false;
- update_label_.SetText(l10n_util::GetStringF(IDS_UPGRADE_ERROR,
- UTF8ToWide(base::IntToString(error_code))));
+ update_label_.SetText(UTF16ToWide(
+ l10n_util::GetStringFUTF16Int(IDS_UPGRADE_ERROR, error_code)));
show_timeout_indicator = true;
break;
default:
diff --git a/chrome/browser/ui/views/autofill_profiles_view_win.cc b/chrome/browser/ui/views/autofill_profiles_view_win.cc
index 1d8b8e3..d7f1cc8 100644
--- a/chrome/browser/ui/views/autofill_profiles_view_win.cc
+++ b/chrome/browser/ui/views/autofill_profiles_view_win.cc
@@ -301,7 +301,7 @@ views::View* AutoFillProfilesView::GetExtraView() {
views::GridLayout::USE_PREF, 0, 0);
layout->StartRow(0, 0);
views::Link* link = new views::Link(
- l10n_util::GetString(IDS_AUTOFILL_LEARN_MORE));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_AUTOFILL_LEARN_MORE)));
link->SetController(this);
layout->AddView(link);
@@ -323,7 +323,7 @@ bool AutoFillProfilesView::IsDialogButtonEnabled(
std::wstring AutoFillProfilesView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_AUTOFILL_OPTIONS_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_AUTOFILL_OPTIONS_TITLE));
}
void AutoFillProfilesView::WindowClosing() {
@@ -448,7 +448,7 @@ void AutoFillProfilesView::Init() {
GetData();
enable_auto_fill_button_ = new views::Checkbox(
- l10n_util::GetString(IDS_OPTIONS_AUTOFILL_ENABLE));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_AUTOFILL_ENABLE)));
enable_auto_fill_button_->set_listener(this);
table_model_.reset(new ContentListTableModel(&profiles_set_,
@@ -460,13 +460,13 @@ void AutoFillProfilesView::Init() {
scroll_view_->SetObserver(this);
add_address_button_ = new views::NativeButton(this,
- l10n_util::GetString(IDS_AUTOFILL_ADD_ADDRESS_BUTTON));
- add_credit_card_button_ = new views::NativeButton(this,
- l10n_util::GetString(IDS_AUTOFILL_ADD_CREDITCARD_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_AUTOFILL_ADD_ADDRESS_BUTTON)));
+ add_credit_card_button_ = new views::NativeButton(this, UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_AUTOFILL_ADD_CREDITCARD_BUTTON)));
edit_button_ = new views::NativeButton(this,
- l10n_util::GetString(IDS_AUTOFILL_EDIT_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_AUTOFILL_EDIT_BUTTON)));
remove_button_ = new views::NativeButton(this,
- l10n_util::GetString(IDS_AUTOFILL_DELETE_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_AUTOFILL_DELETE_BUTTON)));
views::GridLayout* layout = CreatePanelGridLayout(this);
SetLayoutManager(layout);
@@ -746,7 +746,7 @@ AutoFillProfilesView::EditableSetViewContents::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
switch (button) {
case MessageBoxFlags::DIALOGBUTTON_OK:
- return l10n_util::GetString(IDS_AUTOFILL_DIALOG_SAVE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_SAVE));
case MessageBoxFlags::DIALOGBUTTON_CANCEL:
return std::wstring();
default:
@@ -812,7 +812,7 @@ AutoFillProfilesView::EditableSetViewContents::GetWindowTitle() const {
string_id = new_item_ ? IDS_AUTOFILL_ADD_CREDITCARD_CAPTION :
IDS_AUTOFILL_EDIT_CREDITCARD_CAPTION;
}
- return l10n_util::GetString(string_id);
+ return UTF16ToWide(l10n_util::GetStringUTF16(string_id));
}
void AutoFillProfilesView::EditableSetViewContents::WindowClosing() {
@@ -942,16 +942,16 @@ void AutoFillProfilesView::EditableSetViewContents::InitAddressFields(
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(0, double_column_leading_view_set_id_);
- layout->AddView(new views::Label(l10n_util::GetString(
- IDS_AUTOFILL_DIALOG_ADDRESS_LINE_1)));
+ layout->AddView(new views::Label(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_AUTOFILL_DIALOG_ADDRESS_LINE_1))));
layout->StartRow(0, double_column_fill_view_set_id_);
layout->AddView(text_fields_[TEXT_ADDRESS_LINE_1]);
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(0, double_column_leading_view_set_id_);
- layout->AddView(new views::Label(l10n_util::GetString(
- IDS_AUTOFILL_DIALOG_ADDRESS_LINE_2)));
+ layout->AddView(new views::Label(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_AUTOFILL_DIALOG_ADDRESS_LINE_2))));
layout->StartRow(0, double_column_fill_view_set_id_);
layout->AddView(text_fields_[TEXT_ADDRESS_LINE_2]);
@@ -1172,7 +1172,8 @@ void AutoFillProfilesView::EditableSetViewContents::InitLayoutGrid(
views::Label*
AutoFillProfilesView::EditableSetViewContents::CreateLeftAlignedLabel(
int label_id) {
- views::Label* label = new views::Label(l10n_util::GetString(label_id));
+ views::Label* label =
+ new views::Label(UTF16ToWide(l10n_util::GetStringUTF16(label_id)));
label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
return label;
}
@@ -1281,12 +1282,14 @@ TableModel::Groups AutoFillProfilesView::ContentListTableModel::GetGroups() {
TableModel::Groups groups;
TableModel::Group profile_group;
- profile_group.title = l10n_util::GetString(IDS_AUTOFILL_ADDRESSES_GROUP_NAME);
+ profile_group.title =
+ l10n_util::GetStringUTF16(IDS_AUTOFILL_ADDRESSES_GROUP_NAME);
profile_group.id = kAddressGroup;
groups.push_back(profile_group);
Group cc_group;
- cc_group.title = l10n_util::GetString(IDS_AUTOFILL_CREDITCARDS_GROUP_NAME);
+ cc_group.title =
+ l10n_util::GetStringUTF16(IDS_AUTOFILL_CREDITCARDS_GROUP_NAME);
cc_group.id = kCreditCardGroup;
groups.push_back(cc_group);
diff --git a/chrome/browser/ui/views/clear_browsing_data_view.cc b/chrome/browser/ui/views/clear_browsing_data_view.cc
index 1aec286..2aced59 100644
--- a/chrome/browser/ui/views/clear_browsing_data_view.cc
+++ b/chrome/browser/ui/views/clear_browsing_data_view.cc
@@ -83,44 +83,45 @@ void ClearBrowsingDataView2::Init() {
throbber_->SetVisible(false);
status_label_ = new views::Label(
- l10n_util::GetString(IDS_CLEAR_DATA_DELETING));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CLEAR_DATA_DELETING)));
status_label_->SetVisible(false);
// Regular view controls we draw by ourself. First, we add the dialog label.
delete_all_label_ = new views::Label(
- l10n_util::GetString(IDS_CLEAR_BROWSING_DATA_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CLEAR_BROWSING_DATA_LABEL)));
// Add all the check-boxes.
- del_history_checkbox_ =
- AddCheckbox(l10n_util::GetString(IDS_DEL_BROWSING_HISTORY_CHKBOX),
+ del_history_checkbox_ = AddCheckbox(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_DEL_BROWSING_HISTORY_CHKBOX)),
profile_->GetPrefs()->GetBoolean(prefs::kDeleteBrowsingHistory));
- del_downloads_checkbox_ =
- AddCheckbox(l10n_util::GetString(IDS_DEL_DOWNLOAD_HISTORY_CHKBOX),
+ del_downloads_checkbox_ = AddCheckbox(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_DEL_DOWNLOAD_HISTORY_CHKBOX)),
profile_->GetPrefs()->GetBoolean(prefs::kDeleteDownloadHistory));
- del_cache_checkbox_ =
- AddCheckbox(l10n_util::GetString(IDS_DEL_CACHE_CHKBOX),
+ del_cache_checkbox_ = AddCheckbox(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_DEL_CACHE_CHKBOX)),
profile_->GetPrefs()->GetBoolean(prefs::kDeleteCache));
- del_cookies_checkbox_ =
- AddCheckbox(l10n_util::GetString(IDS_DEL_COOKIES_CHKBOX),
+ del_cookies_checkbox_ = AddCheckbox(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_DEL_COOKIES_CHKBOX)),
profile_->GetPrefs()->GetBoolean(prefs::kDeleteCookies));
- del_passwords_checkbox_ =
- AddCheckbox(l10n_util::GetString(IDS_DEL_PASSWORDS_CHKBOX),
+ del_passwords_checkbox_ = AddCheckbox(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_DEL_PASSWORDS_CHKBOX)),
profile_->GetPrefs()->GetBoolean(prefs::kDeletePasswords));
- del_form_data_checkbox_ =
- AddCheckbox(l10n_util::GetString(IDS_DEL_FORM_DATA_CHKBOX),
+ del_form_data_checkbox_ = AddCheckbox(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_DEL_FORM_DATA_CHKBOX)),
profile_->GetPrefs()->GetBoolean(prefs::kDeleteFormData));
clear_browsing_data_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_CLEAR_BROWSING_DATA_BUTTON));
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CLEAR_BROWSING_DATA_BUTTON)));
// Add a label which appears before the combo box for the time period.
- time_period_label_ = new views::Label(
- l10n_util::GetString(IDS_CLEAR_BROWSING_DATA_TIME_LABEL));
+ time_period_label_ = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_CLEAR_BROWSING_DATA_TIME_LABEL)));
// Add the combo box showing how far back in time we want to delete.
time_period_combobox_ = new views::Combobox(this);
diff --git a/chrome/browser/ui/views/clear_server_data.cc b/chrome/browser/ui/views/clear_server_data.cc
index da2ac87..34c158d 100644
--- a/chrome/browser/ui/views/clear_server_data.cc
+++ b/chrome/browser/ui/views/clear_server_data.cc
@@ -80,35 +80,36 @@ void ClearServerDataView::Init() {
rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, gfx::Font::BOLD);
flash_title_label_ = new views::Label(
- l10n_util::GetString(IDS_CLEAR_DATA_ADOBE_FLASH_TITLE));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CLEAR_DATA_ADOBE_FLASH_TITLE)));
flash_title_label_->SetFont(title_font);
- flash_description_label_= new views::Label(
- l10n_util::GetString(IDS_CLEAR_DATA_ADOBE_FLASH_DESCRIPTION));
- flash_link_ =
- new views::Link(l10n_util::GetString(IDS_FLASH_STORAGE_SETTINGS));
+ flash_description_label_= new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_CLEAR_DATA_ADOBE_FLASH_DESCRIPTION)));
+ flash_link_ = new views::Link(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FLASH_STORAGE_SETTINGS)));
flash_link_->SetController(this);
chrome_sync_title_label_= new views::Label(
- l10n_util::GetString(IDS_CLEAR_DATA_CHROME_SYNC_TITLE));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CLEAR_DATA_CHROME_SYNC_TITLE)));
chrome_sync_title_label_->SetFont(title_font);
- chrome_sync_description_label_ = new views::Label(
- l10n_util::GetString(IDS_CLEAR_DATA_CLEAR_SERVER_DATA_DESCRIPTION));
+ chrome_sync_description_label_ = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_CLEAR_DATA_CLEAR_SERVER_DATA_DESCRIPTION)));
clear_server_data_button_= new views::NativeButton(
- this, l10n_util::GetString(IDS_CLEAR_DATA_CLEAR_BUTTON));
+ this,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CLEAR_DATA_CLEAR_BUTTON)));
dashboard_label_ = new views::Label(
- l10n_util::GetString(IDS_CLEAR_DASHBOARD_DESCRIPTION));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CLEAR_DASHBOARD_DESCRIPTION)));
dashboard_link_ = new views::Link();
dashboard_link_->SetController(this);
- dashboard_link_->SetText(
- l10n_util::GetString(IDS_SYNC_PRIVACY_DASHBOARD_LINK_LABEL));
+ dashboard_link_->SetText(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_SYNC_PRIVACY_DASHBOARD_LINK_LABEL)));
status_label_ = new views::Label(
- l10n_util::GetString(IDS_CLEAR_DATA_DELETING));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CLEAR_DATA_DELETING)));
throbber_ = new views::Throbber(50, true);
}
@@ -234,8 +235,8 @@ void ClearServerDataView::ButtonPressed(
ConfirmMessageBoxDialog::Run(
GetWindow()->GetNativeWindow(),
this,
- l10n_util::GetString(IDS_CONFIRM_CLEAR_DESCRIPTION),
- l10n_util::GetString(IDS_CONFIRM_CLEAR_TITLE));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CONFIRM_CLEAR_DESCRIPTION)),
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CONFIRM_CLEAR_TITLE)));
}
}
@@ -303,14 +304,16 @@ void ClearServerDataView::UpdateControlEnabledState() {
case ProfileSyncService::CLEAR_CLEARING:
// Clearing buttons on all tabs are disabled at this
// point, throbber is going
- status_label_->SetText(l10n_util::GetString(IDS_CLEAR_DATA_SENDING));
+ status_label_->SetText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CLEAR_DATA_SENDING)));
status_label_->SetVisible(true);
delete_in_progress = true;
break;
case ProfileSyncService::CLEAR_FAILED:
// Show an error and reallow clearing
clear_data_parent_window_->FailedClearingServerData();
- status_label_->SetText(l10n_util::GetString(IDS_CLEAR_DATA_ERROR));
+ status_label_->SetText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CLEAR_DATA_ERROR)));
status_label_->SetVisible(true);
delete_in_progress = false;
break;
diff --git a/chrome/browser/ui/views/collected_cookies_win.cc b/chrome/browser/ui/views/collected_cookies_win.cc
index 308c0c4..a545971 100644
--- a/chrome/browser/ui/views/collected_cookies_win.cc
+++ b/chrome/browser/ui/views/collected_cookies_win.cc
@@ -80,18 +80,21 @@ class InfobarView : public views::View {
std::wstring label;
switch (setting) {
case CONTENT_SETTING_BLOCK:
- label = l10n_util::GetStringF(
- IDS_COLLECTED_COOKIES_BLOCK_RULE_CREATED, domain_name);
+ label = UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_COLLECTED_COOKIES_BLOCK_RULE_CREATED,
+ WideToUTF16(domain_name)));
break;
case CONTENT_SETTING_ALLOW:
- label = l10n_util::GetStringF(
- IDS_COLLECTED_COOKIES_ALLOW_RULE_CREATED, domain_name);
+ label = UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_COLLECTED_COOKIES_ALLOW_RULE_CREATED,
+ WideToUTF16(domain_name)));
break;
case CONTENT_SETTING_SESSION_ONLY:
- label = l10n_util::GetStringF(
- IDS_COLLECTED_COOKIES_SESSION_RULE_CREATED, domain_name);
+ label = UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_COLLECTED_COOKIES_SESSION_RULE_CREATED,
+ WideToUTF16(domain_name)));
break;
default:
@@ -186,8 +189,8 @@ void CollectedCookiesWin::Init() {
tab_contents_->profile()->GetHostContentSettingsMap();
// Allowed Cookie list.
- allowed_label_ = new views::Label(
- l10n_util::GetString(IDS_COLLECTED_COOKIES_ALLOWED_COOKIES_LABEL));
+ allowed_label_ = new views::Label(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_COLLECTED_COOKIES_ALLOWED_COOKIES_LABEL)));
allowed_cookies_tree_model_.reset(
content_settings->GetAllowedCookiesTreeModel());
allowed_cookies_tree_ = new views::TreeView();
@@ -200,10 +203,10 @@ void CollectedCookiesWin::Init() {
// Blocked Cookie list.
blocked_label_ = new views::Label(
- l10n_util::GetString(
+ UTF16ToWide(l10n_util::GetStringUTF16(
host_content_settings_map->BlockThirdPartyCookies() ?
IDS_COLLECTED_COOKIES_BLOCKED_THIRD_PARTY_BLOCKING_ENABLED :
- IDS_COLLECTED_COOKIES_BLOCKED_COOKIES_LABEL));
+ IDS_COLLECTED_COOKIES_BLOCKED_COOKIES_LABEL)));
blocked_label_->SetMultiLine(true);
blocked_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
blocked_cookies_tree_model_.reset(
@@ -245,8 +248,8 @@ void CollectedCookiesWin::Init() {
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(0, single_column_layout_id);
- block_allowed_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_COLLECTED_COOKIES_BLOCK_BUTTON));
+ block_allowed_button_ = new views::NativeButton(this, UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_BLOCK_BUTTON)));
layout->AddView(
block_allowed_button_, 1, 1, GridLayout::LEADING, GridLayout::CENTER);
layout->AddPaddingRow(0, kUnrelatedControlVerticalSpacing);
@@ -267,11 +270,11 @@ void CollectedCookiesWin::Init() {
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
layout->StartRow(0, three_columns_layout_id);
- allow_blocked_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_COLLECTED_COOKIES_ALLOW_BUTTON));
+ allow_blocked_button_ = new views::NativeButton(this, UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_ALLOW_BUTTON)));
layout->AddView(allow_blocked_button_);
- for_session_blocked_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_COLLECTED_COOKIES_SESSION_ONLY_BUTTON));
+ for_session_blocked_button_ = new views::NativeButton(this, UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_SESSION_ONLY_BUTTON)));
layout->AddView(for_session_blocked_button_);
layout->StartRow(0, single_column_layout_id);
@@ -285,7 +288,8 @@ void CollectedCookiesWin::Init() {
// ConstrainedDialogDelegate implementation.
std::wstring CollectedCookiesWin::GetWindowTitle() const {
- return l10n_util::GetString(IDS_COLLECTED_COOKIES_DIALOG_TITLE);
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_DIALOG_TITLE));
}
int CollectedCookiesWin::GetDialogButtons() const {
@@ -294,7 +298,7 @@ int CollectedCookiesWin::GetDialogButtons() const {
std::wstring CollectedCookiesWin::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
- return l10n_util::GetString(IDS_CLOSE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_CLOSE));
}
void CollectedCookiesWin::DeleteDelegate() {
diff --git a/chrome/browser/ui/views/confirm_message_box_dialog.cc b/chrome/browser/ui/views/confirm_message_box_dialog.cc
index 3f3a1a3..10569f9 100644
--- a/chrome/browser/ui/views/confirm_message_box_dialog.cc
+++ b/chrome/browser/ui/views/confirm_message_box_dialog.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "app/message_box_flags.h"
+#include "base/utf_string_conversions.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "views/standard_layout.h"
@@ -53,10 +54,10 @@ ConfirmMessageBoxDialog::ConfirmMessageBoxDialog(
preferred_size_(gfx::Size(views::Window::GetLocalizedContentsSize(
IDS_CONFIRM_MESSAGE_BOX_DEFAULT_WIDTH_CHARS,
IDS_CONFIRM_MESSAGE_BOX_DEFAULT_HEIGHT_LINES))),
- confirm_label_(l10n_util::GetString(
- IDS_CONFIRM_MESSAGEBOX_YES_BUTTON_LABEL)),
- reject_label_(l10n_util::GetString(
- IDS_CONFIRM_MESSAGEBOX_NO_BUTTON_LABEL)) {
+ confirm_label_(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_CONFIRM_MESSAGEBOX_YES_BUTTON_LABEL))),
+ reject_label_(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_CONFIRM_MESSAGEBOX_NO_BUTTON_LABEL))) {
message_label_ = new views::Label(message_text);
message_label_->SetMultiLine(true);
message_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
diff --git a/chrome/browser/ui/views/cookie_info_view.cc b/chrome/browser/ui/views/cookie_info_view.cc
index 7fe0d54..0b3fe98 100644
--- a/chrome/browser/ui/views/cookie_info_view.cc
+++ b/chrome/browser/ui/views/cookie_info_view.cc
@@ -67,14 +67,15 @@ void CookieInfoView::SetCookie(
std::wstring expire_text = cookie.DoesExpire() ?
base::TimeFormatFriendlyDateAndTime(cookie.ExpiryDate()) :
- l10n_util::GetString(IDS_COOKIES_COOKIE_EXPIRES_SESSION);
+ UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_EXPIRES_SESSION));
if (editable_expiration_date_) {
expire_combo_values_.clear();
if (cookie.DoesExpire())
expire_combo_values_.push_back(expire_text);
- expire_combo_values_.push_back(
- l10n_util::GetString(IDS_COOKIES_COOKIE_EXPIRES_SESSION));
+ expire_combo_values_.push_back(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_EXPIRES_SESSION)));
expires_value_combobox_->ModelChanged();
expires_value_combobox_->SetSelectedItem(0);
expires_value_combobox_->SetEnabled(true);
@@ -84,8 +85,10 @@ void CookieInfoView::SetCookie(
}
send_for_value_field_->SetText(cookie.IsSecure() ?
- l10n_util::GetString(IDS_COOKIES_COOKIE_SENDFOR_SECURE) :
- l10n_util::GetString(IDS_COOKIES_COOKIE_SENDFOR_ANY));
+ UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_SENDFOR_SECURE)) :
+ UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_SENDFOR_ANY)));
EnableCookieDisplay(true);
Layout();
}
@@ -100,7 +103,7 @@ void CookieInfoView::SetCookieString(const GURL& url,
void CookieInfoView::ClearCookieDisplay() {
std::wstring no_cookie_string =
- l10n_util::GetString(IDS_COOKIES_COOKIE_NONESELECTED);
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_NONESELECTED));
name_value_field_->SetText(no_cookie_string);
content_value_field_->SetText(no_cookie_string);
domain_value_field_->SetText(no_cookie_string);
@@ -184,25 +187,25 @@ void CookieInfoView::Init() {
set_border(border);
name_label_ = new views::Label(
- l10n_util::GetString(IDS_COOKIES_COOKIE_NAME_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_NAME_LABEL)));
name_value_field_ = new views::Textfield;
content_label_ = new views::Label(
- l10n_util::GetString(IDS_COOKIES_COOKIE_CONTENT_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_CONTENT_LABEL)));
content_value_field_ = new views::Textfield;
domain_label_ = new views::Label(
- l10n_util::GetString(IDS_COOKIES_COOKIE_DOMAIN_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_DOMAIN_LABEL)));
domain_value_field_ = new views::Textfield;
path_label_ = new views::Label(
- l10n_util::GetString(IDS_COOKIES_COOKIE_PATH_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_PATH_LABEL)));
path_value_field_ = new views::Textfield;
send_for_label_ = new views::Label(
- l10n_util::GetString(IDS_COOKIES_COOKIE_SENDFOR_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_SENDFOR_LABEL)));
send_for_value_field_ = new views::Textfield;
created_label_ = new views::Label(
- l10n_util::GetString(IDS_COOKIES_COOKIE_CREATED_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_CREATED_LABEL)));
created_value_field_ = new views::Textfield;
expires_label_ = new views::Label(
- l10n_util::GetString(IDS_COOKIES_COOKIE_EXPIRES_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_EXPIRES_LABEL)));
if (editable_expiration_date_)
expires_value_combobox_ = new views::Combobox(this);
else
diff --git a/chrome/browser/ui/views/database_info_view.cc b/chrome/browser/ui/views/database_info_view.cc
index 70596e3..065d814 100644
--- a/chrome/browser/ui/views/database_info_view.cc
+++ b/chrome/browser/ui/views/database_info_view.cc
@@ -35,7 +35,8 @@ DatabaseInfoView::~DatabaseInfoView() {
void DatabaseInfoView::SetDatabaseInfo(
const BrowsingDataDatabaseHelper::DatabaseInfo& database_info) {
name_value_field_->SetText(database_info.database_name.empty() ?
- l10n_util::GetString(IDS_COOKIES_WEB_DATABASE_UNNAMED_NAME) :
+ UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COOKIES_WEB_DATABASE_UNNAMED_NAME)) :
UTF8ToWide(database_info.database_name));
description_value_field_->SetText(UTF8ToWide(database_info.description));
size_value_field_->SetText(
@@ -82,16 +83,19 @@ void DatabaseInfoView::Init() {
set_border(border);
views::Label* name_label = new views::Label(
- l10n_util::GetString(IDS_COOKIES_COOKIE_NAME_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_NAME_LABEL)));
name_value_field_ = new views::Textfield;
views::Label* description_label = new views::Label(
- l10n_util::GetString(IDS_COOKIES_WEB_DATABASE_DESCRIPTION_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_COOKIES_WEB_DATABASE_DESCRIPTION_LABEL)));
description_value_field_ = new views::Textfield;
views::Label* size_label = new views::Label(
- l10n_util::GetString(IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL)));
size_value_field_ = new views::Textfield;
views::Label* last_modified_label = new views::Label(
- l10n_util::GetString(IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL)));
last_modified_value_field_ = new views::Textfield;
using views::GridLayout;
diff --git a/chrome/browser/ui/views/default_search_view.cc b/chrome/browser/ui/views/default_search_view.cc
index 34dcbf1..b2c1e27 100644
--- a/chrome/browser/ui/views/default_search_view.cc
+++ b/chrome/browser/ui/views/default_search_view.cc
@@ -57,7 +57,7 @@ void GetShortNameAndLogoId(PrefService* prefs,
views::Label* CreateProviderLabel(int message_id) {
views::Label* choice_label =
- new views::Label(l10n_util::GetString(message_id));
+ new views::Label(UTF16ToWide(l10n_util::GetStringUTF16(message_id)));
choice_label->SetColor(SK_ColorBLACK);
choice_label->SetFont(
choice_label->font().DeriveFont(1, gfx::Font::NORMAL));
@@ -101,8 +101,8 @@ views::NativeButton* CreateProviderChoiceButton(
views::ButtonListener* listener,
int message_id,
const std::wstring& short_name) {
- return new views::NativeButton(listener, l10n_util::GetStringF(
- message_id, short_name));
+ return new views::NativeButton(listener, UTF16ToWide(
+ l10n_util::GetStringFUTF16(message_id, WideToUTF16(short_name))));
}
} // namespace
@@ -144,7 +144,7 @@ void DefaultSearchView::ButtonPressed(views::Button* sender,
}
std::wstring DefaultSearchView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_DEFAULT_SEARCH_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_DEFAULT_SEARCH_TITLE));
}
views::View* DefaultSearchView::GetInitiallyFocusedView() {
@@ -264,9 +264,9 @@ void DefaultSearchView::SetupControls(PrefService* prefs) {
// Add text informing the user about the requested default change.
layout->StartRowWithPadding(0, kPaddedWholeDialogViewSetId,
1, kLabelToControlVerticalSpacing);
- Label* summary_label = new Label(l10n_util::GetStringF(
+ Label* summary_label = new Label(UTF16ToWide(l10n_util::GetStringFUTF16(
IDS_DEFAULT_SEARCH_SUMMARY,
- proposed_short_name));
+ WideToUTF16(proposed_short_name))));
summary_label->SetColor(SK_ColorBLACK);
summary_label->SetFont(
summary_label->font().DeriveFont(1, gfx::Font::NORMAL));
diff --git a/chrome/browser/ui/views/first_run_bubble.cc b/chrome/browser/ui/views/first_run_bubble.cc
index 1aa3e98..8fe3cd4 100644
--- a/chrome/browser/ui/views/first_run_bubble.cc
+++ b/chrome/browser/ui/views/first_run_bubble.cc
@@ -100,22 +100,25 @@ FirstRunBubbleView::FirstRunBubbleView(FirstRunBubble* bubble_window,
const gfx::Font& font =
ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::MediumFont);
- label1_ = new views::Label(l10n_util::GetString(IDS_FR_BUBBLE_TITLE));
+ label1_ = new views::Label(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_TITLE)));
label1_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
label1_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(label1_);
gfx::Size ps = GetPreferredSize();
- label2_ = new views::Label(l10n_util::GetString(IDS_FR_BUBBLE_SUBTEXT));
+ label2_ = new views::Label(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_SUBTEXT)));
label2_->SetMultiLine(true);
label2_->SetFont(font);
label2_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
label2_->SizeToFit(ps.width() - kBubblePadding * 2);
AddChildView(label2_);
- std::wstring question_str = l10n_util::GetStringF(IDS_FR_BUBBLE_QUESTION,
- UTF16ToWideHack(GetDefaultSearchEngineName(profile)));
+ std::wstring question_str = UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_FR_BUBBLE_QUESTION,
+ GetDefaultSearchEngineName(profile)));
label3_ = new views::Label(question_str);
label3_->SetMultiLine(true);
label3_->SetFont(font);
@@ -123,13 +126,15 @@ FirstRunBubbleView::FirstRunBubbleView(FirstRunBubble* bubble_window,
label3_->SizeToFit(ps.width() - kBubblePadding * 2);
AddChildView(label3_);
- std::wstring keep_str = l10n_util::GetStringF(IDS_FR_BUBBLE_OK,
- UTF16ToWideHack(GetDefaultSearchEngineName(profile)));
+ std::wstring keep_str = UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_FR_BUBBLE_OK,
+ GetDefaultSearchEngineName(profile)));
keep_button_ = new views::NativeButton(this, keep_str);
keep_button_->SetIsDefault(true);
AddChildView(keep_button_);
- std::wstring change_str = l10n_util::GetString(IDS_FR_BUBBLE_CHANGE);
+ std::wstring change_str =
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_CHANGE));
change_button_ = new views::NativeButton(this, change_str);
AddChildView(change_button_);
}
@@ -259,20 +264,23 @@ FirstRunOEMBubbleView::FirstRunOEMBubbleView(FirstRunBubble* bubble_window,
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
const gfx::Font& font = rb.GetFont(ResourceBundle::MediumFont);
- label1_ = new views::Label(l10n_util::GetString(IDS_FR_OEM_BUBBLE_TITLE_1));
+ label1_ = new views::Label(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FR_OEM_BUBBLE_TITLE_1)));
label1_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
label1_->SetColor(SK_ColorRED);
label1_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(label1_);
- label2_ = new views::Label(l10n_util::GetString(IDS_FR_OEM_BUBBLE_TITLE_2));
+ label2_ = new views::Label(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FR_OEM_BUBBLE_TITLE_2)));
label2_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
label2_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(label2_);
gfx::Size ps = GetPreferredSize();
- label3_ = new views::Label(l10n_util::GetString(IDS_FR_OEM_BUBBLE_SUBTEXT));
+ label3_ = new views::Label(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FR_OEM_BUBBLE_SUBTEXT)));
label3_->SetMultiLine(true);
label3_->SetFont(font);
label3_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
@@ -402,15 +410,17 @@ FirstRunMinimalBubbleView::FirstRunMinimalBubbleView(
const gfx::Font& font =
ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::MediumFont);
- label1_ = new views::Label(l10n_util::GetStringF(IDS_FR_SE_BUBBLE_TITLE,
- UTF16ToWideHack(GetDefaultSearchEngineName(profile_))));
+ label1_ = new views::Label(UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_FR_SE_BUBBLE_TITLE,
+ GetDefaultSearchEngineName(profile_))));
label1_->SetFont(font.DeriveFont(3, gfx::Font::BOLD));
label1_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(label1_);
gfx::Size ps = GetPreferredSize();
- label2_ = new views::Label(l10n_util::GetString(IDS_FR_BUBBLE_SUBTEXT));
+ label2_ = new views::Label(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FR_BUBBLE_SUBTEXT)));
label2_->SetMultiLine(true);
label2_->SetFont(font);
label2_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
diff --git a/chrome/browser/ui/views/first_run_search_engine_view.cc b/chrome/browser/ui/views/first_run_search_engine_view.cc
index fa4e6a7..91cf367 100644
--- a/chrome/browser/ui/views/first_run_search_engine_view.cc
+++ b/chrome/browser/ui/views/first_run_search_engine_view.cc
@@ -13,6 +13,7 @@
#include "base/i18n/rtl.h"
#include "base/rand_util.h"
#include "base/time.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/search_engine_type.h"
#include "chrome/browser/search_engines/template_url.h"
@@ -53,7 +54,9 @@ const int kLabelPadding = 25;
SearchEngineChoice::SearchEngineChoice(views::ButtonListener* listener,
const TemplateURL* search_engine,
bool use_small_logos)
- : NativeButton(listener, l10n_util::GetString(IDS_FR_SEARCH_CHOOSE)),
+ : NativeButton(
+ listener,
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_FR_SEARCH_CHOOSE))),
is_image_label_(false),
search_engine_(search_engine),
slot_(0) {
@@ -293,8 +296,8 @@ void FirstRunSearchEngineView::SetupControls() {
int label_width = GetPreferredSize().width() - 2 * kPanelHorizMargin;
// Add title and text asking the user to choose a search engine:
- title_label_ = new Label(l10n_util::GetString(
- IDS_FR_SEARCH_MAIN_LABEL));
+ title_label_ = new Label(UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_FR_SEARCH_MAIN_LABEL)));
title_label_->SetColor(SK_ColorBLACK);
title_label_->SetFont(title_label_->font().DeriveFont(3, gfx::Font::BOLD));
title_label_->SetMultiLine(true);
@@ -302,8 +305,9 @@ void FirstRunSearchEngineView::SetupControls() {
title_label_->SizeToFit(label_width);
AddChildView(title_label_);
- text_label_ = new Label(l10n_util::GetStringF(IDS_FR_SEARCH_TEXT,
- l10n_util::GetString(IDS_PRODUCT_NAME)));
+ text_label_ = new Label(UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_FR_SEARCH_TEXT,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))));
text_label_->SetColor(SK_ColorBLACK);
text_label_->SetFont(text_label_->font().DeriveFont(1, gfx::Font::NORMAL));
text_label_->SetMultiLine(true);
@@ -426,5 +430,5 @@ AccessibilityTypes::Role FirstRunSearchEngineView::GetAccessibleRole() {
}
std::wstring FirstRunSearchEngineView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_FIRSTRUN_DLG_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_FIRSTRUN_DLG_TITLE));
}
diff --git a/chrome/browser/ui/views/generic_info_view.cc b/chrome/browser/ui/views/generic_info_view.cc
index 81ebb4a..7eb6d90 100644
--- a/chrome/browser/ui/views/generic_info_view.cc
+++ b/chrome/browser/ui/views/generic_info_view.cc
@@ -5,8 +5,9 @@
#include "chrome/browser/views/generic_info_view.h"
#include "app/l10n_util.h"
-#include "gfx/color_utils.h"
#include "base/logging.h"
+#include "base/utf_string_conversions.h"
+#include "gfx/color_utils.h"
#include "views/grid_layout.h"
#include "views/controls/label.h"
#include "views/controls/textfield/textfield.h"
@@ -24,7 +25,7 @@ GenericInfoView::GenericInfoView(
}
void GenericInfoView::SetNameByStringId(int row, int name_string_id) {
- SetName(row, l10n_util::GetString(name_string_id));
+ SetName(row, UTF16ToWide(l10n_util::GetStringUTF16(name_string_id)));
}
void GenericInfoView::SetName(int row, const string16& name) {
diff --git a/chrome/browser/ui/views/hung_renderer_view.cc b/chrome/browser/ui/views/hung_renderer_view.cc
index 8f4c925..95184af 100644
--- a/chrome/browser/ui/views/hung_renderer_view.cc
+++ b/chrome/browser/ui/views/hung_renderer_view.cc
@@ -267,7 +267,8 @@ void HungRendererDialogView::EndForTabContents(TabContents* contents) {
// HungRendererDialogView, views::DialogDelegate implementation:
std::wstring HungRendererDialogView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_BROWSER_HANGMONITOR_RENDERER_TITLE);
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_BROWSER_HANGMONITOR_RENDERER_TITLE));
}
void HungRendererDialogView::WindowClosing() {
@@ -288,7 +289,8 @@ int HungRendererDialogView::GetDialogButtons() const {
std::wstring HungRendererDialogView::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
if (button == MessageBoxFlags::DIALOGBUTTON_OK)
- return l10n_util::GetString(IDS_BROWSER_HANGMONITOR_RENDERER_WAIT);
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_BROWSER_HANGMONITOR_RENDERER_WAIT));
return std::wstring();
}
@@ -344,7 +346,7 @@ void HungRendererDialogView::Init() {
frozen_icon_view_->SetImage(frozen_icon_);
info_label_ = new views::Label(
- l10n_util::GetString(IDS_BROWSER_HANGMONITOR_RENDERER));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_BROWSER_HANGMONITOR_RENDERER)));
info_label_->SetMultiLine(true);
info_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
@@ -387,8 +389,8 @@ void HungRendererDialogView::Init() {
}
void HungRendererDialogView::CreateKillButtonView() {
- kill_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_BROWSER_HANGMONITOR_RENDERER_END));
+ kill_button_ = new views::NativeButton(this, UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_BROWSER_HANGMONITOR_RENDERER_END)));
kill_button_container_ = new ButtonContainer;
diff --git a/chrome/browser/ui/views/importer_lock_view.cc b/chrome/browser/ui/views/importer_lock_view.cc
index 8fc1c9a..714265c 100644
--- a/chrome/browser/ui/views/importer_lock_view.cc
+++ b/chrome/browser/ui/views/importer_lock_view.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "base/message_loop.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/importer/importer.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -22,7 +23,7 @@ ImporterLockView::ImporterLockView(ImporterHost* host)
: description_label_(NULL),
importer_host_(host) {
description_label_ = new views::Label(
- l10n_util::GetString(IDS_IMPORTER_LOCK_TEXT));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORTER_LOCK_TEXT)));
description_label_->SetMultiLine(true);
description_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(description_label_);
@@ -46,9 +47,9 @@ void ImporterLockView::Layout() {
std::wstring ImporterLockView::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
if (button == MessageBoxFlags::DIALOGBUTTON_OK) {
- return l10n_util::GetString(IDS_IMPORTER_LOCK_OK);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORTER_LOCK_OK));
} else if (button == MessageBoxFlags::DIALOGBUTTON_CANCEL) {
- return l10n_util::GetString(IDS_IMPORTER_LOCK_CANCEL);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORTER_LOCK_CANCEL));
}
return std::wstring();
}
@@ -58,7 +59,7 @@ bool ImporterLockView::IsModal() const {
}
std::wstring ImporterLockView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_IMPORTER_LOCK_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORTER_LOCK_TITLE));
}
bool ImporterLockView::Accept() {
diff --git a/chrome/browser/ui/views/importer_view.cc b/chrome/browser/ui/views/importer_view.cc
index cbbfba7..9af35f4 100644
--- a/chrome/browser/ui/views/importer_view.cc
+++ b/chrome/browser/ui/views/importer_view.cc
@@ -53,28 +53,28 @@ ImporterView::~ImporterView() {
void ImporterView::SetupControl() {
// Adds all controls.
- import_from_label_ =
- new views::Label(l10n_util::GetString(IDS_IMPORT_FROM_LABEL));
+ import_from_label_ = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_IMPORT_FROM_LABEL)));
profile_combobox_ = new views::Combobox(this);
profile_combobox_->set_listener(this);
profile_combobox_->SetAccessibleName(import_from_label_->GetText());
- import_items_label_ =
- new views::Label(l10n_util::GetString(IDS_IMPORT_ITEMS_LABEL));
-
- history_checkbox_ =
- InitCheckbox(l10n_util::GetString(IDS_IMPORT_HISTORY_CHKBOX),
- (initial_state_ & importer::HISTORY) != 0);
- favorites_checkbox_ =
- InitCheckbox(l10n_util::GetString(IDS_IMPORT_FAVORITES_CHKBOX),
- (initial_state_ & importer::FAVORITES) != 0);
- passwords_checkbox_ =
- InitCheckbox(l10n_util::GetString(IDS_IMPORT_PASSWORDS_CHKBOX),
- (initial_state_ & importer::PASSWORDS) != 0);
- search_engines_checkbox_ =
- InitCheckbox(l10n_util::GetString(IDS_IMPORT_SEARCH_ENGINES_CHKBOX),
- (initial_state_ & importer::SEARCH_ENGINES) != 0);
+ import_items_label_ = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_IMPORT_ITEMS_LABEL)));
+
+ history_checkbox_ = InitCheckbox(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_HISTORY_CHKBOX)),
+ (initial_state_ & importer::HISTORY) != 0);
+ favorites_checkbox_ = InitCheckbox(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_FAVORITES_CHKBOX)),
+ (initial_state_ & importer::FAVORITES) != 0);
+ passwords_checkbox_ = InitCheckbox(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_PASSWORDS_CHKBOX)),
+ (initial_state_ & importer::PASSWORDS) != 0);
+ search_engines_checkbox_ = InitCheckbox(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_SEARCH_ENGINES_CHKBOX)),
+ (initial_state_ & importer::SEARCH_ENGINES) != 0);
// Arranges controls by using GridLayout.
const int column_set_id = 0;
@@ -122,7 +122,7 @@ void ImporterView::Layout() {
std::wstring ImporterView::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
if (button == MessageBoxFlags::DIALOGBUTTON_OK) {
- return l10n_util::GetString(IDS_IMPORT_COMMIT);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_COMMIT));
} else {
return std::wstring();
}
@@ -145,7 +145,7 @@ bool ImporterView::IsModal() const {
}
std::wstring ImporterView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_IMPORT_SETTINGS_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_SETTINGS_TITLE));
}
bool ImporterView::Accept() {
diff --git a/chrome/browser/ui/views/importing_progress_view.cc b/chrome/browser/ui/views/importing_progress_view.cc
index ae3135e..2befd5f 100644
--- a/chrome/browser/ui/views/importing_progress_view.cc
+++ b/chrome/browser/ui/views/importing_progress_view.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/views/importing_progress_view.h"
#include "app/l10n_util.h"
+#include "base/utf_string_conversions.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -28,16 +29,16 @@ ImportingProgressView::ImportingProgressView(const std::wstring& source_name,
state_passwords_(new views::CheckmarkThrobber),
state_history_(new views::CheckmarkThrobber),
state_cookies_(new views::CheckmarkThrobber),
- label_bookmarks_(new views::Label(
- l10n_util::GetString(IDS_IMPORT_PROGRESS_STATUS_BOOKMARKS))),
- label_searches_(new views::Label(
- l10n_util::GetString(IDS_IMPORT_PROGRESS_STATUS_SEARCH))),
- label_passwords_(new views::Label(
- l10n_util::GetString(IDS_IMPORT_PROGRESS_STATUS_PASSWORDS))),
- label_history_(new views::Label(
- l10n_util::GetString(IDS_IMPORT_PROGRESS_STATUS_HISTORY))),
- label_cookies_(new views::Label(
- l10n_util::GetString(IDS_IMPORT_PROGRESS_STATUS_COOKIES))),
+ label_bookmarks_(new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_IMPORT_PROGRESS_STATUS_BOOKMARKS)))),
+ label_searches_(new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_IMPORT_PROGRESS_STATUS_SEARCH)))),
+ label_passwords_(new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_IMPORT_PROGRESS_STATUS_PASSWORDS)))),
+ label_history_(new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_IMPORT_PROGRESS_STATUS_HISTORY)))),
+ label_cookies_(new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_IMPORT_PROGRESS_STATUS_COOKIES)))),
parent_window_(parent_window),
coordinator_(coordinator),
import_observer_(observer),
@@ -45,8 +46,10 @@ ImportingProgressView::ImportingProgressView(const std::wstring& source_name,
importing_(true),
bookmarks_import_(bookmarks_import) {
std::wstring info_text = bookmarks_import ?
- l10n_util::GetString(IDS_IMPORT_BOOKMARKS) :
- l10n_util::GetStringF(IDS_IMPORT_PROGRESS_INFO, source_name);
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_BOOKMARKS)) :
+ UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_IMPORT_PROGRESS_INFO,
+ WideToUTF16(source_name)));
label_info_ = new views::Label(info_text);
coordinator_->SetObserver(this);
label_info_->SetMultiLine(true);
@@ -188,7 +191,8 @@ int ImportingProgressView::GetDialogButtons() const {
std::wstring ImportingProgressView::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
DCHECK(button == MessageBoxFlags::DIALOGBUTTON_CANCEL);
- return l10n_util::GetString(IDS_IMPORT_PROGRESS_STATUS_CANCEL);
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_IMPORT_PROGRESS_STATUS_CANCEL));
}
bool ImportingProgressView::IsModal() const {
@@ -196,7 +200,7 @@ bool ImportingProgressView::IsModal() const {
}
std::wstring ImportingProgressView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_IMPORT_PROGRESS_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_PROGRESS_TITLE));
}
bool ImportingProgressView::Cancel() {
diff --git a/chrome/browser/ui/views/indexed_db_info_view.cc b/chrome/browser/ui/views/indexed_db_info_view.cc
index 733ef6e..a1718ef 100644
--- a/chrome/browser/ui/views/indexed_db_info_view.cc
+++ b/chrome/browser/ui/views/indexed_db_info_view.cc
@@ -51,7 +51,7 @@ void IndexedDBInfoView::EnableIndexedDBDisplay(bool enabled) {
void IndexedDBInfoView::ClearIndexedDBDisplay() {
std::wstring no_cookie_string =
- l10n_util::GetString(IDS_COOKIES_COOKIE_NONESELECTED);
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_NONESELECTED));
origin_value_field_->SetText(no_cookie_string);
size_value_field_->SetText(no_cookie_string);
last_modified_value_field_->SetText(no_cookie_string);
@@ -77,14 +77,15 @@ void IndexedDBInfoView::Init() {
kIndexedDBInfoViewBorderSize, border_color);
set_border(border);
- views::Label* origin_label = new views::Label(
- l10n_util::GetString(IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL));
+ views::Label* origin_label = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL)));
origin_value_field_ = new views::Textfield;
- views::Label* size_label = new views::Label(
- l10n_util::GetString(IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL));
+ views::Label* size_label = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL)));
size_value_field_ = new views::Textfield;
- views::Label* last_modified_label = new views::Label(
- l10n_util::GetString(IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL));
+ views::Label* last_modified_label = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(
+ IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL)));
last_modified_value_field_ = new views::Textfield;
using views::GridLayout;
diff --git a/chrome/browser/ui/views/keyword_editor_view.cc b/chrome/browser/ui/views/keyword_editor_view.cc
index 610fa9e..bd2c820 100644
--- a/chrome/browser/ui/views/keyword_editor_view.cc
+++ b/chrome/browser/ui/views/keyword_editor_view.cc
@@ -126,7 +126,8 @@ bool KeywordEditorView::CanResize() const {
}
std::wstring KeywordEditorView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_SEARCH_ENGINES_EDITOR_WINDOW_TITLE);
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_SEARCH_ENGINES_EDITOR_WINDOW_TITLE));
}
std::wstring KeywordEditorView::GetWindowName() const {
@@ -165,19 +166,19 @@ void KeywordEditorView::Init() {
views::ICON_AND_TEXT, false, true, true);
table_view_->SetObserver(this);
- add_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_SEARCH_ENGINES_EDITOR_NEW_BUTTON));
+ add_button_ = new views::NativeButton(this, UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_SEARCH_ENGINES_EDITOR_NEW_BUTTON)));
add_button_->SetEnabled(controller_->loaded());
add_button_->AddAccelerator(
views::Accelerator(app::VKEY_A, false, false, true));
add_button_->SetAccessibleKeyboardShortcut(L"A");
- edit_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_SEARCH_ENGINES_EDITOR_EDIT_BUTTON));
+ edit_button_ = new views::NativeButton(this, UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_SEARCH_ENGINES_EDITOR_EDIT_BUTTON)));
edit_button_->SetEnabled(false);
- remove_button_ = new views::NativeButton(
- this, l10n_util::GetString(IDS_SEARCH_ENGINES_EDITOR_REMOVE_BUTTON));
+ remove_button_ = new views::NativeButton(this, UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_SEARCH_ENGINES_EDITOR_REMOVE_BUTTON)));
remove_button_->SetEnabled(false);
remove_button_->AddAccelerator(
views::Accelerator(app::VKEY_R, false, false, true));
@@ -185,7 +186,8 @@ void KeywordEditorView::Init() {
make_default_button_ = new views::NativeButton(
this,
- l10n_util::GetString(IDS_SEARCH_ENGINES_EDITOR_MAKE_DEFAULT_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_SEARCH_ENGINES_EDITOR_MAKE_DEFAULT_BUTTON)));
make_default_button_->SetEnabled(false);
InitLayoutManager();
diff --git a/chrome/browser/ui/views/local_storage_info_view.cc b/chrome/browser/ui/views/local_storage_info_view.cc
index 35c7c49..b21b74e 100644
--- a/chrome/browser/ui/views/local_storage_info_view.cc
+++ b/chrome/browser/ui/views/local_storage_info_view.cc
@@ -52,7 +52,7 @@ void LocalStorageInfoView::EnableLocalStorageDisplay(bool enabled) {
void LocalStorageInfoView::ClearLocalStorageDisplay() {
std::wstring no_cookie_string =
- l10n_util::GetString(IDS_COOKIES_COOKIE_NONESELECTED);
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_NONESELECTED));
origin_value_field_->SetText(no_cookie_string);
size_value_field_->SetText(no_cookie_string);
last_modified_value_field_->SetText(no_cookie_string);
@@ -78,14 +78,15 @@ void LocalStorageInfoView::Init() {
kLocalStorageInfoViewBorderSize, border_color);
set_border(border);
- views::Label* origin_label = new views::Label(
- l10n_util::GetString(IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL));
+ views::Label* origin_label = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_ORIGIN_LABEL)));
origin_value_field_ = new views::Textfield;
- views::Label* size_label = new views::Label(
- l10n_util::GetString(IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL));
+ views::Label* size_label = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_SIZE_ON_DISK_LABEL)));
size_value_field_ = new views::Textfield;
- views::Label* last_modified_label = new views::Label(
- l10n_util::GetString(IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL));
+ views::Label* last_modified_label = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(
+ IDS_COOKIES_LOCAL_STORAGE_LAST_MODIFIED_LABEL)));
last_modified_value_field_ = new views::Textfield;
using views::GridLayout;
diff --git a/chrome/browser/ui/views/local_storage_set_item_info_view.cc b/chrome/browser/ui/views/local_storage_set_item_info_view.cc
index 8df4de4..24b2d75 100644
--- a/chrome/browser/ui/views/local_storage_set_item_info_view.cc
+++ b/chrome/browser/ui/views/local_storage_set_item_info_view.cc
@@ -47,7 +47,7 @@ void LocalStorageSetItemInfoView::EnableLocalStorageDisplay(bool enabled) {
void LocalStorageSetItemInfoView::ClearLocalStorageDisplay() {
std::wstring no_cookie_string =
- l10n_util::GetString(IDS_COOKIES_COOKIE_NONESELECTED);
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_NONESELECTED));
host_value_field_->SetText(no_cookie_string);
key_value_field_->SetText(no_cookie_string);
value_value_field_->SetText(no_cookie_string);
@@ -73,14 +73,15 @@ void LocalStorageSetItemInfoView::Init() {
set_border(border);
// TODO(jorlow): These strings are not quite right, but we're post-freeze.
- views::Label* host_label = new views::Label(
- l10n_util::GetString(IDS_COOKIES_COOKIE_DOMAIN_LABEL));
+ // http://crbug.com/68688
+ views::Label* host_label = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COOKIES_COOKIE_DOMAIN_LABEL)));
host_value_field_ = new views::Textfield;
- views::Label* key_label = new views::Label(
- l10n_util::GetString(IDS_COOKIES_LOCAL_STORAGE_KEY_LABEL));
+ views::Label* key_label = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_KEY_LABEL)));
key_value_field_ = new views::Textfield;
- views::Label* value_label = new views::Label(
- l10n_util::GetString(IDS_COOKIES_LOCAL_STORAGE_VALUE_LABEL));
+ views::Label* value_label = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_COOKIES_LOCAL_STORAGE_VALUE_LABEL)));
value_value_field_ = new views::Textfield;
using views::GridLayout;
diff --git a/chrome/browser/ui/views/login_view.cc b/chrome/browser/ui/views/login_view.cc
index 3bf2403..a7e4e40 100644
--- a/chrome/browser/ui/views/login_view.cc
+++ b/chrome/browser/ui/views/login_view.cc
@@ -9,6 +9,7 @@
#include "app/l10n_util.h"
#include "base/compiler_specific.h"
#include "base/message_loop.h"
+#include "base/utf_string_conversions.h"
#include "grit/generated_resources.h"
#include "views/grid_layout.h"
#include "views/controls/label.h"
@@ -28,10 +29,10 @@ LoginView::LoginView(const std::wstring& explanation,
bool focus_view)
: username_field_(new views::Textfield),
password_field_(new views::Textfield(views::Textfield::STYLE_PASSWORD)),
- username_label_(new views::Label(
- l10n_util::GetString(IDS_LOGIN_DIALOG_USERNAME_FIELD))),
- password_label_(new views::Label(
- l10n_util::GetString(IDS_LOGIN_DIALOG_PASSWORD_FIELD))),
+ username_label_(new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_LOGIN_DIALOG_USERNAME_FIELD)))),
+ password_label_(new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_LOGIN_DIALOG_PASSWORD_FIELD)))),
message_label_(new views::Label(explanation)),
ALLOW_THIS_IN_INITIALIZER_LIST(focus_grabber_factory_(this)),
login_model_(NULL),
diff --git a/chrome/browser/ui/views/page_info_bubble_view.cc b/chrome/browser/ui/views/page_info_bubble_view.cc
index 073c6f7..5c27cd4 100644
--- a/chrome/browser/ui/views/page_info_bubble_view.cc
+++ b/chrome/browser/ui/views/page_info_bubble_view.cc
@@ -154,8 +154,8 @@ void PageInfoBubbleView::LayoutSections() {
// Then add the help center link at the bottom.
layout->StartRow(0, 1);
- help_center_link_ =
- new views::Link(l10n_util::GetString(IDS_PAGE_INFO_HELP_CENTER_LINK));
+ help_center_link_ = new views::Link(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_PAGE_INFO_HELP_CENTER_LINK)));
help_center_link_->SetController(this);
layout->AddView(help_center_link_);
}
@@ -254,7 +254,7 @@ Section::Section(PageInfoBubbleView* owner,
if (info_.type == PageInfoModel::SECTION_INFO_IDENTITY && show_cert) {
link_ = new views::Link(
- l10n_util::GetString(IDS_PAGEINFO_CERT_INFO_BUTTON));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON)));
link_->SetController(this);
AddChildView(link_);
}
diff --git a/chrome/browser/ui/views/reload_button.cc b/chrome/browser/ui/views/reload_button.cc
index 941ae3a..0df1030 100644
--- a/chrome/browser/ui/views/reload_button.cc
+++ b/chrome/browser/ui/views/reload_button.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/views/reload_button.h"
#include "app/l10n_util.h"
+#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/views/event_utils.h"
@@ -120,8 +121,9 @@ void ReloadButton::OnMouseExited(const views::MouseEvent& e) {
}
bool ReloadButton::GetTooltipText(const gfx::Point& p, std::wstring* tooltip) {
- tooltip->assign(l10n_util::GetString((visible_mode_ == MODE_RELOAD) ?
- IDS_TOOLTIP_RELOAD : IDS_TOOLTIP_STOP));
+ int text_id = visible_mode_ == MODE_RELOAD ? IDS_TOOLTIP_RELOAD
+ : IDS_TOOLTIP_STOP;
+ tooltip->assign(UTF16ToWide(l10n_util::GetStringUTF16(text_id)));
return true;
}
diff --git a/chrome/browser/ui/views/repost_form_warning_view.cc b/chrome/browser/ui/views/repost_form_warning_view.cc
index d29258b..18022e8 100644
--- a/chrome/browser/ui/views/repost_form_warning_view.cc
+++ b/chrome/browser/ui/views/repost_form_warning_view.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "app/message_box_flags.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_window.h"
#include "chrome/browser/repost_form_warning_controller.h"
@@ -35,7 +36,7 @@ RepostFormWarningView::RepostFormWarningView(
message_box_view_(NULL) {
message_box_view_ = new MessageBoxView(
MessageBoxFlags::kIsConfirmMessageBox,
- l10n_util::GetString(IDS_HTTP_POST_WARNING),
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_HTTP_POST_WARNING)),
std::wstring());
controller_->Show(this);
}
@@ -47,15 +48,15 @@ RepostFormWarningView::~RepostFormWarningView() {
// RepostFormWarningView, views::DialogDelegate implementation:
std::wstring RepostFormWarningView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_HTTP_POST_WARNING_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_HTTP_POST_WARNING_TITLE));
}
std::wstring RepostFormWarningView::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
if (button == MessageBoxFlags::DIALOGBUTTON_OK)
- return l10n_util::GetString(IDS_HTTP_POST_WARNING_RESEND);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_HTTP_POST_WARNING_RESEND));
if (button == MessageBoxFlags::DIALOGBUTTON_CANCEL)
- return l10n_util::GetString(IDS_CANCEL);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_CANCEL));
return std::wstring();
}
diff --git a/chrome/browser/ui/views/shell_dialogs_win.cc b/chrome/browser/ui/views/shell_dialogs_win.cc
index 7fd9912..7405ef6 100644
--- a/chrome/browser/ui/views/shell_dialogs_win.cc
+++ b/chrome/browser/ui/views/shell_dialogs_win.cc
@@ -104,7 +104,8 @@ std::wstring FormatFilterForExtensions(
const std::vector<std::wstring>& ext_desc,
bool include_all_files) {
const std::wstring all_ext = L"*.*";
- const std::wstring all_desc = l10n_util::GetString(IDS_APP_SAVEAS_ALL_FILES);
+ const std::wstring all_desc =
+ l10n_util::GetStringUTF16(IDS_APP_SAVEAS_ALL_FILES);
DCHECK(file_ext.size() >= ext_desc.size());
@@ -141,9 +142,9 @@ std::wstring FormatFilterForExtensions(
// based on the unknown extension type (i.e. if the extension is .qqq,
// the we create a description "QQQ File (.qqq)").
include_all_files = true;
- desc = l10n_util::GetStringF(IDS_APP_SAVEAS_EXTENSION_FORMAT,
- l10n_util::ToUpper(ext_name),
- ext_name);
+ desc = l10n_util::GetStringFUTF16(IDS_APP_SAVEAS_EXTENSION_FORMAT,
+ l10n_util::ToUpper(ext_name),
+ ext_name);
}
if (desc.empty())
desc = L"*." + ext_name;
diff --git a/chrome/browser/ui/views/ssl_client_certificate_selector_win.cc b/chrome/browser/ui/views/ssl_client_certificate_selector_win.cc
index c7ddab3..45bb28f 100644
--- a/chrome/browser/ui/views/ssl_client_certificate_selector_win.cc
+++ b/chrome/browser/ui/views/ssl_client_certificate_selector_win.cc
@@ -41,10 +41,11 @@ void ShowSSLClientCertificateSelector(
DCHECK(ok);
}
- std::wstring title = l10n_util::GetString(IDS_CLIENT_CERT_DIALOG_TITLE);
- std::wstring text = l10n_util::GetStringF(
+ std::wstring title =
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_CLIENT_CERT_DIALOG_TITLE));
+ std::wstring text = UTF16ToWide(l10n_util::GetStringFUTF16(
IDS_CLIENT_CERT_DIALOG_TEXT,
- ASCIIToWide(cert_request_info->host_and_port));
+ ASCIIToUTF16(cert_request_info->host_and_port)));
PCCERT_CONTEXT cert_context = CryptUIDlgSelectCertificateFromStore(
client_certs, parent->GetMessageBoxRootWindow(),
title.c_str(), text.c_str(), 0, 0, NULL);
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index 7044ec2..5b22d5c 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -7,6 +7,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/i18n/number_formatting.h"
+#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/accessibility/browser_accessibility_state.h"
#include "chrome/browser/background_page_tracker.h"
@@ -154,16 +155,20 @@ void ToolbarView::Init(Profile* profile) {
back_->set_tag(IDC_BACK);
back_->SetImageAlignment(views::ImageButton::ALIGN_RIGHT,
views::ImageButton::ALIGN_TOP);
- back_->SetTooltipText(l10n_util::GetString(IDS_TOOLTIP_BACK));
- back_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_BACK));
+ back_->SetTooltipText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_TOOLTIP_BACK)));
+ back_->SetAccessibleName(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_BACK)));
back_->SetID(VIEW_ID_BACK_BUTTON);
forward_ = new views::ButtonDropDown(this, forward_menu_model_.get());
forward_->set_triggerable_event_flags(views::Event::EF_LEFT_BUTTON_DOWN |
views::Event::EF_MIDDLE_BUTTON_DOWN);
forward_->set_tag(IDC_FORWARD);
- forward_->SetTooltipText(l10n_util::GetString(IDS_TOOLTIP_FORWARD));
- forward_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_FORWARD));
+ forward_->SetTooltipText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_TOOLTIP_FORWARD)));
+ forward_->SetAccessibleName(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_FORWARD)));
forward_->SetID(VIEW_ID_FORWARD_BUTTON);
// Have to create this before |reload_| as |reload_|'s constructor needs it.
@@ -175,17 +180,20 @@ void ToolbarView::Init(Profile* profile) {
reload_->set_triggerable_event_flags(views::Event::EF_LEFT_BUTTON_DOWN |
views::Event::EF_MIDDLE_BUTTON_DOWN);
reload_->set_tag(IDC_RELOAD);
- reload_->SetTooltipText(l10n_util::GetString(IDS_TOOLTIP_RELOAD));
- reload_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_RELOAD));
+ reload_->SetTooltipText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_TOOLTIP_RELOAD)));
+ reload_->SetAccessibleName(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_RELOAD)));
reload_->SetID(VIEW_ID_RELOAD_BUTTON);
#if defined(OS_CHROMEOS)
feedback_ = new views::ImageButton(this);
feedback_->set_tag(IDC_FEEDBACK);
feedback_->set_triggerable_event_flags(views::Event::EF_LEFT_BUTTON_DOWN |
- views::Event::EF_MIDDLE_BUTTON_DOWN);
+ views::Event::EF_MIDDLE_BUTTON_DOWN);
feedback_->set_tag(IDC_FEEDBACK);
- feedback_->SetTooltipText(l10n_util::GetString(IDS_TOOLTIP_FEEDBACK));
+ feedback_->SetTooltipText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_TOOLTIP_FEEDBACK)));
feedback_->SetID(VIEW_ID_FEEDBACK_BUTTON);
#endif
@@ -193,8 +201,10 @@ void ToolbarView::Init(Profile* profile) {
home_->set_triggerable_event_flags(views::Event::EF_LEFT_BUTTON_DOWN |
views::Event::EF_MIDDLE_BUTTON_DOWN);
home_->set_tag(IDC_HOME);
- home_->SetTooltipText(l10n_util::GetString(IDS_TOOLTIP_HOME));
- home_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_HOME));
+ home_->SetTooltipText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_TOOLTIP_HOME)));
+ home_->SetAccessibleName(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_HOME)));
home_->SetID(VIEW_ID_HOME_BUTTON);
browser_actions_ = new BrowserActionsContainer(browser_, this);
@@ -202,9 +212,11 @@ void ToolbarView::Init(Profile* profile) {
app_menu_ = new views::MenuButton(NULL, std::wstring(), this, false);
app_menu_->set_border(NULL);
app_menu_->EnableCanvasFlippingForRTLUI(true);
- app_menu_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_APP));
- app_menu_->SetTooltipText(l10n_util::GetStringF(IDS_APPMENU_TOOLTIP,
- l10n_util::GetString(IDS_PRODUCT_NAME)));
+ app_menu_->SetAccessibleName(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_APP)));
+ app_menu_->SetTooltipText(UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_APPMENU_TOOLTIP,
+ l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))));
app_menu_->SetID(VIEW_ID_APP_MENU);
// Add any necessary badges to the menu item based on the system state.
@@ -234,8 +246,10 @@ void ToolbarView::Init(Profile* profile) {
// Accessibility specific tooltip text.
if (BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser()) {
- back_->SetTooltipText(l10n_util::GetString(IDS_ACCNAME_TOOLTIP_BACK));
- forward_->SetTooltipText(l10n_util::GetString(IDS_ACCNAME_TOOLTIP_FORWARD));
+ back_->SetTooltipText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_TOOLTIP_BACK)));
+ forward_->SetTooltipText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_TOOLTIP_FORWARD)));
}
}
diff --git a/chrome/browser/ui/views/uninstall_view.cc b/chrome/browser/ui/views/uninstall_view.cc
index ecd2ac7..2217319 100644
--- a/chrome/browser/ui/views/uninstall_view.cc
+++ b/chrome/browser/ui/views/uninstall_view.cc
@@ -47,7 +47,8 @@ void UninstallView::SetupControls() {
column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0,
GridLayout::USE_PREF, 0, 0);
layout->StartRow(0, column_set_id);
- confirm_label_ = new views::Label(l10n_util::GetString(IDS_UNINSTALL_VERIFY));
+ confirm_label_ = new views::Label(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_UNINSTALL_VERIFY)));
confirm_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
layout->AddView(confirm_label_);
@@ -61,7 +62,7 @@ void UninstallView::SetupControls() {
GridLayout::USE_PREF, 0, 0);
layout->StartRow(0, column_set_id);
delete_profile_ = new views::Checkbox(
- l10n_util::GetString(IDS_UNINSTALL_DELETE_PROFILE));
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_UNINSTALL_DELETE_PROFILE)));
layout->AddView(delete_profile_);
// Set default browser combo box
@@ -82,8 +83,8 @@ void UninstallView::SetupControls() {
column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0,
GridLayout::USE_PREF, 0, 0);
layout->StartRow(0, column_set_id);
- change_default_browser_ = new views::Checkbox(
- l10n_util::GetString(IDS_UNINSTALL_SET_DEFAULT_BROWSER));
+ change_default_browser_ = new views::Checkbox(UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_UNINSTALL_SET_DEFAULT_BROWSER)));
change_default_browser_->set_listener(this);
layout->AddView(change_default_browser_);
browsers_combo_ = new views::Combobox(this);
@@ -119,7 +120,7 @@ std::wstring UninstallView::GetDialogButtonLabel(
// button remains same.
std::wstring label = L"";
if (button == MessageBoxFlags::DIALOGBUTTON_OK)
- label = l10n_util::GetString(IDS_UNINSTALL_BUTTON_TEXT);
+ label = UTF16ToWide(l10n_util::GetStringUTF16(IDS_UNINSTALL_BUTTON_TEXT));
return label;
}
@@ -133,7 +134,7 @@ void UninstallView::ButtonPressed(
}
std::wstring UninstallView::GetWindowTitle() const {
- return l10n_util::GetString(IDS_UNINSTALL_CHROME);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_UNINSTALL_CHROME));
}
views::View* UninstallView::GetContentsView() {
diff --git a/chrome/browser/ui/views/update_recommended_message_box.cc b/chrome/browser/ui/views/update_recommended_message_box.cc
index baf69ab..019846e 100644
--- a/chrome/browser/ui/views/update_recommended_message_box.cc
+++ b/chrome/browser/ui/views/update_recommended_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 "chrome/browser/browser_list.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_service.h"
@@ -55,12 +56,12 @@ std::wstring UpdateRecommendedMessageBox::GetDialogButtonLabel(
DCHECK(button == MessageBoxFlags::DIALOGBUTTON_OK ||
button == MessageBoxFlags::DIALOGBUTTON_CANCEL);
return button == MessageBoxFlags::DIALOGBUTTON_OK ?
- l10n_util::GetString(IDS_RESTART_AND_UPDATE) :
- l10n_util::GetString(IDS_NOT_NOW);
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_RESTART_AND_UPDATE)) :
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_NOT_NOW));
}
std::wstring UpdateRecommendedMessageBox::GetWindowTitle() const {
- return l10n_util::GetString(IDS_PRODUCT_NAME);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
}
void UpdateRecommendedMessageBox::DeleteDelegate() {
@@ -82,14 +83,16 @@ UpdateRecommendedMessageBox::UpdateRecommendedMessageBox(
gfx::NativeWindow parent_window) {
const int kDialogWidth = 400;
#if defined(OS_CHROMEOS)
- const std::wstring product_name = l10n_util::GetString(IDS_PRODUCT_OS_NAME);
+ const int kProductNameId = IDS_PRODUCT_OS_NAME;
#else
- const std::wstring product_name = l10n_util::GetString(IDS_PRODUCT_NAME);
+ const int kProductNameId = IDS_PRODUCT_NAME;
#endif
+ const string16 product_name = l10n_util::GetStringUTF16(kProductNameId);
// Also deleted when the window closes.
message_box_view_ = new MessageBoxView(
MessageBoxFlags::kFlagHasMessage | MessageBoxFlags::kFlagHasOKButton,
- l10n_util::GetStringF(IDS_UPDATE_RECOMMENDED, product_name),
+ UTF16ToWide(l10n_util::GetStringFUTF16(IDS_UPDATE_RECOMMENDED,
+ product_name)),
std::wstring(),
kDialogWidth);
browser::CreateViewsWindow(parent_window, gfx::Rect(), this)->Show();
diff --git a/chrome/browser/ui/views/url_picker.cc b/chrome/browser/ui/views/url_picker.cc
index 14a294c..e1977ee 100644
--- a/chrome/browser/ui/views/url_picker.cc
+++ b/chrome/browser/ui/views/url_picker.cc
@@ -88,7 +88,7 @@ UrlPicker::UrlPicker(UrlPickerDelegate* delegate,
layout->StartRow(0, labels_column_set_id);
views::Label* url_label = new views::Label();
url_label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
- url_label->SetText(l10n_util::GetString(IDS_ASI_URL));
+ url_label->SetText(UTF16ToWide(l10n_util::GetStringUTF16(IDS_ASI_URL)));
layout->AddView(url_label);
url_field_ = new views::Textfield();
@@ -100,7 +100,8 @@ UrlPicker::UrlPicker(UrlPickerDelegate* delegate,
layout->StartRow(0, single_column_view_set_id);
views::Label* description_label = new views::Label();
description_label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
- description_label->SetText(l10n_util::GetString(IDS_ASI_DESCRIPTION));
+ description_label->SetText(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ASI_DESCRIPTION)));
description_label->SetFont(
description_label->font().DeriveFont(0, gfx::Font::BOLD));
layout->AddView(description_label);
@@ -133,7 +134,7 @@ void UrlPicker::Close() {
}
std::wstring UrlPicker::GetWindowTitle() const {
- return l10n_util::GetString(IDS_ASI_ADD_TITLE);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_ASI_ADD_TITLE));
}
bool UrlPicker::IsModal() const {
@@ -143,7 +144,7 @@ bool UrlPicker::IsModal() const {
std::wstring UrlPicker::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
if (button == MessageBoxFlags::DIALOGBUTTON_OK)
- return l10n_util::GetString(IDS_ASI_ADD);
+ return UTF16ToWide(l10n_util::GetStringUTF16(IDS_ASI_ADD));
return std::wstring();
}
diff --git a/chrome/browser/ui/views/user_data_dir_dialog.cc b/chrome/browser/ui/views/user_data_dir_dialog.cc
index 59a8a8a..9784cd5 100644
--- a/chrome/browser/ui/views/user_data_dir_dialog.cc
+++ b/chrome/browser/ui/views/user_data_dir_dialog.cc
@@ -5,6 +5,7 @@
#include "app/l10n_util.h"
#include "app/message_box_flags.h"
#include "base/logging.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/views/user_data_dir_dialog.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -25,8 +26,9 @@ UserDataDirDialog::UserDataDirDialog(const FilePath& user_data_dir)
: ALLOW_THIS_IN_INITIALIZER_LIST(
select_file_dialog_(SelectFileDialog::Create(this))),
is_blocking_(true) {
- std::wstring message_text = l10n_util::GetStringF(
- IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY, user_data_dir.ToWStringHack());
+ std::wstring message_text = UTF16ToWide(l10n_util::GetStringFUTF16(
+ IDS_CANT_WRITE_USER_DIRECTORY_SUMMARY,
+ WideToUTF16Hack(user_data_dir.ToWStringHack())));
const int kDialogWidth = 400;
message_box_view_ = new MessageBoxView(MessageBoxFlags::kIsConfirmMessageBox,
message_text.c_str(), std::wstring(), kDialogWidth);
@@ -43,10 +45,11 @@ std::wstring UserDataDirDialog::GetDialogButtonLabel(
switch (button) {
case MessageBoxFlags::DIALOGBUTTON_OK:
- return l10n_util::GetString(
- IDS_CANT_WRITE_USER_DIRECTORY_CHOOSE_DIRECTORY_BUTTON);
+ return UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_CANT_WRITE_USER_DIRECTORY_CHOOSE_DIRECTORY_BUTTON));
case MessageBoxFlags::DIALOGBUTTON_CANCEL:
- return l10n_util::GetString(IDS_CANT_WRITE_USER_DIRECTORY_EXIT_BUTTON);
+ return UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_CANT_WRITE_USER_DIRECTORY_EXIT_BUTTON));
default:
NOTREACHED();
}
@@ -55,7 +58,8 @@ std::wstring UserDataDirDialog::GetDialogButtonLabel(
}
std::wstring UserDataDirDialog::GetWindowTitle() const {
- return l10n_util::GetString(IDS_CANT_WRITE_USER_DIRECTORY_TITLE);
+ return UTF16ToWide(
+ l10n_util::GetStringUTF16(IDS_CANT_WRITE_USER_DIRECTORY_TITLE));
}
void UserDataDirDialog::DeleteDelegate() {
@@ -64,8 +68,8 @@ void UserDataDirDialog::DeleteDelegate() {
bool UserDataDirDialog::Accept() {
// Directory picker
- std::wstring dialog_title = l10n_util::GetString(
- IDS_CANT_WRITE_USER_DIRECTORY_CHOOSE_DIRECTORY_BUTTON);
+ std::wstring dialog_title = UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_CANT_WRITE_USER_DIRECTORY_CHOOSE_DIRECTORY_BUTTON));
HWND owning_hwnd =
GetAncestor(message_box_view_->GetWidget()->GetNativeView(), GA_ROOT);
select_file_dialog_->SelectFile(SelectFileDialog::SELECT_FOLDER,
diff --git a/chrome/browser/ui/views/wrench_menu.cc b/chrome/browser/ui/views/wrench_menu.cc
index d791005..bc10859 100644
--- a/chrome/browser/ui/views/wrench_menu.cc
+++ b/chrome/browser/ui/views/wrench_menu.cc
@@ -246,7 +246,8 @@ class ScheduleAllView : public views::View {
std::wstring GetAccessibleNameForWrenchMenuItem(
MenuModel* model, int item_index, int accessible_string_id) {
- std::wstring accessible_name = l10n_util::GetString(accessible_string_id);
+ std::wstring accessible_name =
+ UTF16ToWide(l10n_util::GetStringUTF16(accessible_string_id));
std::wstring accelerator_text;
menus::Accelerator menu_accelerator;
@@ -280,7 +281,7 @@ class WrenchMenuView : public ScheduleAllView, public views::ButtonListener {
MenuButtonBackground** background,
int acc_string_id) {
TextButton* button =
- new TextButton(this, l10n_util::GetString(string_id));
+ new TextButton(this, UTF16ToWide(l10n_util::GetStringUTF16(string_id)));
button->SetAccessibleName(
GetAccessibleNameForWrenchMenuItem(menu_model_, index, acc_string_id));
button->SetFocusable(true);
@@ -397,7 +398,8 @@ class WrenchMenu::ZoomView : public WrenchMenuView,
IDS_ZOOM_MINUS2, MenuButtonBackground::LEFT_BUTTON, decrement_index,
NULL, IDS_ACCNAME_ZOOM_MINUS2);
- zoom_label_ = new Label(l10n_util::GetStringF(IDS_ZOOM_PERCENT, L"100"));
+ zoom_label_ = new Label(
+ UTF16ToWide(l10n_util::GetStringFUTF16Int(IDS_ZOOM_PERCENT, 100)));
zoom_label_->SetColor(MenuConfig::instance().text_color);
zoom_label_->SetHorizontalAlignment(Label::ALIGN_RIGHT);
MenuButtonBackground* center_bg =
@@ -502,9 +504,9 @@ class WrenchMenu::ZoomView : public WrenchMenuView,
zoom = selected_tab->GetZoomPercent(&enable_increment, &enable_decrement);
increment_button_->SetEnabled(enable_increment);
decrement_button_->SetEnabled(enable_decrement);
- zoom_label_->SetText(l10n_util::GetStringF(
- IDS_ZOOM_PERCENT,
- UTF8ToWide(base::IntToString(zoom))));
+ zoom_label_->SetText(UTF16ToWide(l10n_util::GetStringFUTF16Int(
+ IDS_ZOOM_PERCENT,
+ zoom)));
zoom_label_width_ = MaxWidthForZoomLabel();
}
@@ -570,7 +572,8 @@ WrenchMenu::WrenchMenu(Browser* browser)
void WrenchMenu::Init(menus::MenuModel* model) {
DCHECK(!root_.get());
root_.reset(new MenuItemView(this));
- root_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_APP));
+ root_->SetAccessibleName(
+ UTF16ToWide(l10n_util::GetStringUTF16(IDS_ACCNAME_APP)));
root_->set_has_icons(true); // We have checks, radios and icons, set this
// so we get the taller menu style.
int next_id = 1;
@@ -663,7 +666,7 @@ void WrenchMenu::PopulateMenu(MenuItemView* parent,
DCHECK_LT(i + 2, max);
DCHECK_EQ(IDC_COPY, model->GetCommandIdAt(index + 1));
DCHECK_EQ(IDC_PASTE, model->GetCommandIdAt(index + 2));
- item->SetTitle(l10n_util::GetString(IDS_EDIT2));
+ item->SetTitle(UTF16ToWide(l10n_util::GetStringUTF16(IDS_EDIT2)));
item->AddChildView(
new CutCopyPasteView(this, model, index, index + 1, index + 2));
i += 2;
@@ -671,7 +674,7 @@ void WrenchMenu::PopulateMenu(MenuItemView* parent,
DCHECK_EQ(MenuModel::TYPE_COMMAND, model->GetTypeAt(index));
DCHECK_EQ(IDC_ZOOM_PLUS, model->GetCommandIdAt(index + 1));
DCHECK_EQ(IDC_FULLSCREEN, model->GetCommandIdAt(index + 2));
- item->SetTitle(l10n_util::GetString(IDS_ZOOM_MENU2));
+ item->SetTitle(UTF16ToWide(l10n_util::GetStringUTF16(IDS_ZOOM_MENU2)));
item->AddChildView(
new ZoomView(this, model, index, index + 1, index + 2));
i += 2;