summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/download/download_manager.cc')
-rw-r--r--chrome/browser/download/download_manager.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index 2a097f0..ccd986c 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -839,7 +839,7 @@ void DownloadManager::ContinueDownloadFinished(DownloadItem* download) {
// Handle chrome extensions explicitly and skip the shell execute.
if (Extension::IsExtension(download->full_path())) {
- OpenChromeExtension(download->full_path());
+ OpenChromeExtension(download->full_path(), download->url());
download->set_auto_opened(true);
} else if (download->open_when_complete() ||
ShouldOpenFileExtension(extension)) {
@@ -1208,15 +1208,16 @@ void DownloadManager::OpenDownload(const DownloadItem* download,
// Open Chrome extensions with ExtensionsService. For everything else do shell
// execute.
if (Extension::IsExtension(download->full_path())) {
- OpenChromeExtension(download->full_path());
+ OpenChromeExtension(download->full_path(), download->url());
} else {
OpenDownloadInShell(download, parent_window);
}
}
-void DownloadManager::OpenChromeExtension(const FilePath& full_path) {
+void DownloadManager::OpenChromeExtension(const FilePath& full_path,
+ const GURL& download_url) {
profile_->GetOriginalProfile()->GetExtensionsService()->
- InstallExtension(full_path);
+ InstallExtension(full_path, download_url);
}
void DownloadManager::OpenDownloadInShell(const DownloadItem* download,