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

Unified Diff: chrome/browser/ui/cocoa/download/download_util_mac.mm

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/cocoa/download/download_item_controller.mm ('k') | chrome/browser/ui/gtk/custom_drag.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/download/download_util_mac.mm
diff --git a/chrome/browser/ui/cocoa/download/download_util_mac.mm b/chrome/browser/ui/cocoa/download/download_util_mac.mm
index 7cdc99c630f1646399a8159d030163a62a19cd4d..1676f2695340d840f340709d58814720028465f6 100644
--- a/chrome/browser/ui/cocoa/download/download_util_mac.mm
+++ b/chrome/browser/ui/cocoa/download/download_util_mac.mm
@@ -6,6 +6,7 @@
#include "chrome/browser/ui/cocoa/download/download_util_mac.h"
+#include "base/logging.h"
#include "base/sys_string_conversions.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
@@ -28,8 +29,9 @@ void AddFileToPasteboard(NSPasteboard* pasteboard, const FilePath& path) {
void DragDownload(const DownloadItem* download,
gfx::Image* icon,
gfx::NativeView view) {
+ DCHECK(download->IsComplete());
NSPasteboard* pasteboard = [NSPasteboard pasteboardWithName:NSDragPboard];
- AddFileToPasteboard(pasteboard, download->GetFullPath());
+ AddFileToPasteboard(pasteboard, download->GetTargetFilePath());
// Synthesize a drag event, since we don't have access to the actual event
// that initiated a drag (possibly consumed by the Web UI, for example).
« no previous file with comments | « chrome/browser/ui/cocoa/download/download_item_controller.mm ('k') | chrome/browser/ui/gtk/custom_drag.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698