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

Unified Diff: chrome/browser/download/download_util.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
Index: chrome/browser/download/download_util.cc
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc
index 90d045b90270df579dbd6eb74d244452b24c81b3..26a05a5913bbdce8b79fa9993fa02988b284503b 100644
--- a/chrome/browser/download/download_util.cc
+++ b/chrome/browser/download/download_util.cc
@@ -348,6 +348,7 @@ void DragDownload(const DownloadItem* download,
gfx::Image* icon,
gfx::NativeView view) {
DCHECK(download);
+ DCHECK(download->IsComplete());
// Set up our OLE machinery
ui::OSExchangeData data;
@@ -357,7 +358,7 @@ void DragDownload(const DownloadItem* download,
download->GetFileNameToReportUser(), icon->ToImageSkia(), &data);
}
- const FilePath full_path = download->GetFullPath();
+ const FilePath full_path = download->GetTargetFilePath();
data.SetFilename(full_path);
std::string mime_type = download->GetMimeType();
« no previous file with comments | « chrome/browser/chromeos/drive/drive_download_observer.cc ('k') | chrome/browser/ui/cocoa/download/download_item_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698