diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-25 22:12:38 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-25 22:12:38 +0000 |
commit | 7bc4f7095ca7965c555b7c7c15570a443f4b3bcd (patch) | |
tree | 2cac267df85e8724256f39e893ae4765f8fa0fea /chrome/browser/download/download_manager.cc | |
parent | 99872e3d462aa75e4a73fd943567c38225a45c50 (diff) | |
download | chromium_src-7bc4f7095ca7965c555b7c7c15570a443f4b3bcd.zip chromium_src-7bc4f7095ca7965c555b7c7c15570a443f4b3bcd.tar.gz chromium_src-7bc4f7095ca7965c555b7c7c15570a443f4b3bcd.tar.bz2 |
Make extension installation work when the "ask for destination
of every download" preference is set.
BUG=23011
TEST=Set the preference in question, install an extension. You should not get a save as dialog and it should install correctly.
Review URL: http://codereview.chromium.org/252005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27262 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_manager.cc')
-rw-r--r-- | chrome/browser/download/download_manager.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc index a6b9937..b9925e7 100644 --- a/chrome/browser/download/download_manager.cc +++ b/chrome/browser/download/download_manager.cc @@ -566,8 +566,13 @@ void DownloadManager::StartDownload(DownloadCreateInfo* info) { // Freeze the user's preference for showing a Save As dialog. We're going to // 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_) - info->save_as = true; + 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 (!IsExtensionInstall(info)) + info->save_as = true; + } // Determine the proper path for a download, by choosing either the default // download directory, or prompting the user. |