From 486d2544b89922adf39fcbb0a9c7084448903c3e Mon Sep 17 00:00:00 2001 From: "jianli@chromium.org" Date: Thu, 18 Mar 2010 17:34:26 +0000 Subject: Fix the problem that a Save As dialog pops up on drag-out when "Ask where to save each file before downloading" option is checked. BUG=none TEST=none Review URL: http://codereview.chromium.org/1050006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41962 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/download/download_manager.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc index e9ead6c..2c45eb1 100644 --- a/chrome/browser/download/download_manager.cc +++ b/chrome/browser/download/download_manager.cc @@ -638,10 +638,13 @@ void DownloadManager::StartDownload(DownloadCreateInfo* info) { // bounce around a bunch of threads and we don't want to worry about race // conditions where the user changes this pref out from under us. if (*prompt_for_download_) { - // But never obey the preference for extension installation. Note that we - // only care here about the case where an extension is installed, not when - // one is downloaded with "save as...". - if (!info->is_extension_install) + // But never obey the preference for the following scenarios: + // 1) Extension installation. Note that we only care here about the case + // where an extension is installed, not when one is downloaded with + // "save as...". + // 2) Drag-out download. Since we will save to the destination folder that + // is dropped to, we should not pop up a Save As dialog. + if (!info->is_extension_install && info->save_info.file_path.empty()) info->save_as = true; } -- cgit v1.1