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

Unified Diff: chrome/browser/views/download_item_view.cc

Issue 3029025: Download code cleanup: (Closed)
Patch Set: rebase'n'final Created 10 years, 5 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/renderer_host/download_resource_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/download_item_view.cc
diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc
index 348c86dabb1a3d8ff0ac16199bc14f6f9a4974e7..bc5f0c56f0ca8b6fcee8d6cac182b668ab2d821b 100644
--- a/chrome/browser/views/download_item_view.cc
+++ b/chrome/browser/views/download_item_view.cc
@@ -433,7 +433,7 @@ void DownloadItemView::ButtonPressed(
UMA_HISTOGRAM_LONG_TIMES("clickjacking.save_download",
base::Time::Now() - creation_time_);
// This will change the state and notify us.
- download_->manager()->DangerousDownloadValidated(download_);
+ download_->DangerousDownloadValidated();
}
}
@@ -907,11 +907,7 @@ void DownloadItemView::OpenDownload() {
// open downloads super quickly, we should be concerned about clickjacking.
UMA_HISTOGRAM_LONG_TIMES("clickjacking.open_download",
base::Time::Now() - creation_time_);
- if (download_->state() == DownloadItem::IN_PROGRESS) {
- download_->set_open_when_complete(!download_->open_when_complete());
- } else if (download_->state() == DownloadItem::COMPLETE) {
- download_util::OpenDownload(download_);
- }
+ download_->OpenDownload();
}
void DownloadItemView::OnExtractIconComplete(IconManager::Handle handle,
« no previous file with comments | « chrome/browser/renderer_host/download_resource_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698