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

Unified Diff: chrome/browser/ui/webui/active_downloads_ui.cc

Issue 6948013: Fix dangerous downloads. Ellipsis for long filenames. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/active_downloads.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/active_downloads_ui.cc
===================================================================
--- chrome/browser/ui/webui/active_downloads_ui.cc (revision 84547)
+++ chrome/browser/ui/webui/active_downloads_ui.cc (working copy)
@@ -152,6 +152,10 @@
l10n_util::GetStringUTF16(IDS_FILEBROWSER_CONFIRM_DOWNLOAD));
localized_strings.SetString("cancel",
l10n_util::GetStringUTF16(IDS_DOWNLOAD_LINK_CANCEL));
+ localized_strings.SetString("confirmcancel",
+ l10n_util::GetStringUTF16(IDS_FILEBROWSER_CONFIRM_CANCEL));
+ localized_strings.SetString("confirmyes",
+ l10n_util::GetStringUTF16(IDS_FILEBROWSER_CONFIRM_YES));
localized_strings.SetString("open",
l10n_util::GetStringUTF16(IDS_FILEBROWSER_OPEN));
localized_strings.SetString("pause",
@@ -261,13 +265,14 @@
void ActiveDownloadsHandler::HandleAllowDownload(const ListValue* args) {
DownloadItem* item = GetDownloadById(args);
if (item)
- download_manager_->DangerousDownloadValidated(item);
+ item->DangerousDownloadValidated();
}
void ActiveDownloadsHandler::HandleCancelDownload(const ListValue* args) {
DownloadItem* item = GetDownloadById(args);
- if (item && item->IsPartialDownload()) {
- item->Cancel(true);
+ if (item) {
+ if (item->IsPartialDownload())
+ item->Cancel(true);
item->Delete(DownloadItem::DELETE_DUE_TO_USER_DISCARD);
}
}
« no previous file with comments | « chrome/browser/resources/active_downloads.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698