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

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

Issue 11801022: Allow dragging a download only after the download is complete. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk at 175906 Created 7 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
« no previous file with comments | « chrome/browser/ui/gtk/download/download_item_gtk.cc ('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/downloads_dom_handler.cc
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc
index e0dfc553315df6b3703ea901cf0e5a5ddd28ef48..e35644b21f77bab1fc6ea1957297ef66ad2fd44f 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -338,10 +338,10 @@ void DownloadsDOMHandler::HandleDrag(const base::ListValue* args) {
content::DownloadItem* file = GetDownloadByValue(args);
content::WebContents* web_contents = GetWebUIWebContents();
// |web_contents| is only NULL in the test.
- if (!file || !web_contents)
+ if (!file || !web_contents || !file->IsComplete())
return;
gfx::Image* icon = g_browser_process->icon_manager()->LookupIcon(
- file->GetUserVerifiedFilePath(), IconLoader::NORMAL);
+ file->GetTargetFilePath(), IconLoader::NORMAL);
gfx::NativeView view = web_contents->GetNativeView();
{
// Enable nested tasks during DnD, while |DragDownload()| blocks.
« no previous file with comments | « chrome/browser/ui/gtk/download/download_item_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698