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

Unified Diff: chrome/browser/ui/views/download/download_in_progress_dialog_view.cc

Issue 8142026: Revert 104076 - Change std::wstring to string16 for views::Link (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/download/download_in_progress_dialog_view.cc
===================================================================
--- chrome/browser/ui/views/download/download_in_progress_dialog_view.cc (revision 104083)
+++ chrome/browser/ui/views/download/download_in_progress_dialog_view.cc (working copy)
@@ -28,31 +28,31 @@
int download_count = browser->profile()->GetDownloadManager()->
in_progress_count();
- string16 warning_text;
- string16 explanation_text;
+ std::wstring warning_text;
+ std::wstring explanation_text;
if (download_count == 1) {
- warning_text = l10n_util::GetStringFUTF16(
+ warning_text = UTF16ToWide(l10n_util::GetStringFUTF16(
IDS_SINGLE_DOWNLOAD_REMOVE_CONFIRM_WARNING,
- product_name_);
- explanation_text = l10n_util::GetStringFUTF16(
+ product_name_));
+ explanation_text = UTF16ToWide(l10n_util::GetStringFUTF16(
IDS_SINGLE_DOWNLOAD_REMOVE_CONFIRM_EXPLANATION,
- product_name_);
- ok_button_text_ = l10n_util::GetStringUTF16(
- IDS_SINGLE_DOWNLOAD_REMOVE_CONFIRM_OK_BUTTON_LABEL);
- cancel_button_text_ = l10n_util::GetStringUTF16(
- IDS_SINGLE_DOWNLOAD_REMOVE_CONFIRM_CANCEL_BUTTON_LABEL);
+ product_name_));
+ ok_button_text_ = UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_SINGLE_DOWNLOAD_REMOVE_CONFIRM_OK_BUTTON_LABEL));
+ cancel_button_text_ = UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_SINGLE_DOWNLOAD_REMOVE_CONFIRM_CANCEL_BUTTON_LABEL));
} else {
- warning_text = l10n_util::GetStringFUTF16(
+ warning_text = UTF16ToWide(l10n_util::GetStringFUTF16(
IDS_MULTIPLE_DOWNLOADS_REMOVE_CONFIRM_WARNING,
product_name_,
- UTF8ToUTF16(base::IntToString(download_count)));
- explanation_text = l10n_util::GetStringFUTF16(
+ UTF8ToUTF16(base::IntToString(download_count))));
+ explanation_text = UTF16ToWide(l10n_util::GetStringFUTF16(
IDS_MULTIPLE_DOWNLOADS_REMOVE_CONFIRM_EXPLANATION,
- product_name_);
- ok_button_text_ = l10n_util::GetStringUTF16(
- IDS_MULTIPLE_DOWNLOADS_REMOVE_CONFIRM_OK_BUTTON_LABEL);
- cancel_button_text_ = l10n_util::GetStringUTF16(
- IDS_MULTIPLE_DOWNLOADS_REMOVE_CONFIRM_CANCEL_BUTTON_LABEL);
+ product_name_));
+ ok_button_text_ = UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_MULTIPLE_DOWNLOADS_REMOVE_CONFIRM_OK_BUTTON_LABEL));
+ cancel_button_text_ = UTF16ToWide(l10n_util::GetStringUTF16(
+ IDS_MULTIPLE_DOWNLOADS_REMOVE_CONFIRM_CANCEL_BUTTON_LABEL));
}
// There are two lines of text: the bold warning label and the text
@@ -100,10 +100,10 @@
std::wstring DownloadInProgressDialogView::GetDialogButtonLabel(
MessageBoxFlags::DialogButton button) const {
if (button == MessageBoxFlags::DIALOGBUTTON_OK)
- return UTF16ToWideHack(ok_button_text_);
+ return ok_button_text_;
DCHECK_EQ(MessageBoxFlags::DIALOGBUTTON_CANCEL, button);
- return UTF16ToWideHack(cancel_button_text_);
+ return cancel_button_text_;
}
int DownloadInProgressDialogView::GetDefaultDialogButton() const {

Powered by Google App Engine
This is Rietveld 408576698