diff options
author | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-18 17:34:26 +0000 |
---|---|---|
committer | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-18 17:34:26 +0000 |
commit | 486d2544b89922adf39fcbb0a9c7084448903c3e (patch) | |
tree | 1ce4d11e3920a3266e72405f123f1cff9012b60a /chrome/browser/download/download_manager.cc | |
parent | ee48d179fbf2376a62ff4d6b928f2725c088bf10 (diff) | |
download | chromium_src-486d2544b89922adf39fcbb0a9c7084448903c3e.zip chromium_src-486d2544b89922adf39fcbb0a9c7084448903c3e.tar.gz chromium_src-486d2544b89922adf39fcbb0a9c7084448903c3e.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/download/download_manager.cc')
-rw-r--r-- | chrome/browser/download/download_manager.cc | 11 |
1 files 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; } |