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

Unified Diff: chrome/browser/download/download_manager.cc

Issue 252005: Make extension installation work when the "ask for destination (Closed)
Patch Set: Created 11 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_manager.cc
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index a6b99372cdba847d81a883921c180ea419601c78..b9925e73c0ab5a130fb8e9363e8a18b32c908b6b 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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698