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

Unified Diff: content/browser/download/drag_download_file.cc

Issue 148133007: [Downloads] Always call DM::StartDownload() for explicit downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 4 years, 11 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: content/browser/download/drag_download_file.cc
diff --git a/content/browser/download/drag_download_file.cc b/content/browser/download/drag_download_file.cc
index afb533a56bf74dd30e68ba73f3f35185b55f2c4b..6d2db248e74a22daa84af83ff38278793ba5e1d6 100644
--- a/content/browser/download/drag_download_file.cc
+++ b/content/browser/download/drag_download_file.cc
@@ -97,7 +97,7 @@ class DragDownloadFile::DragDownloadFileUI : public DownloadItem::Observer {
void OnDownloadStarted(DownloadItem* item,
DownloadInterruptReason interrupt_reason) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- if (!item) {
+ if (!item || item->GetState() != DownloadItem::IN_PROGRESS) {
DCHECK_NE(DOWNLOAD_INTERRUPT_REASON_NONE, interrupt_reason);
on_completed_loop_->task_runner()->PostTask(
FROM_HERE, base::Bind(on_completed_, false));

Powered by Google App Engine
This is Rietveld 408576698