diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 00:40:10 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-06 00:40:10 +0000 |
commit | a050d710a6d7a00e79cd2dc2f8fe58569e504631 (patch) | |
tree | 27d966c273f59ec3836ad1572284084bee1d0fa6 /chrome | |
parent | 6bd325956b26e6bee7bb651e1fc470612b2ac4cd (diff) | |
download | chromium_src-a050d710a6d7a00e79cd2dc2f8fe58569e504631.zip chromium_src-a050d710a6d7a00e79cd2dc2f8fe58569e504631.tar.gz chromium_src-a050d710a6d7a00e79cd2dc2f8fe58569e504631.tar.bz2 |
If the download manager setting "prompt for a location for each downloaded file" is set, we weren't installing user scripts.
It probably makes sense to check the ".user.js" on the URL always, instead of the path, since that is really what is supposed to happen conceptually.
BUG=26801
TEST=Set settings to always prompt for download location. Install user script. Should get extension install prompt.
Review URL: http://codereview.chromium.org/372006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31179 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/download/download_manager.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc index 1295f25..1d40bec 100644 --- a/chrome/browser/download/download_manager.cc +++ b/chrome/browser/download/download_manager.cc @@ -1253,7 +1253,7 @@ void DownloadManager::OpenChromeExtension(const FilePath& full_path, nservice->Notify(NotificationType::EXTENSION_READY_FOR_INSTALL, Source<DownloadManager>(this), NotificationService::NoDetails()); - if (UserScript::HasUserScriptFileExtension(full_path)) { + if (UserScript::HasUserScriptFileExtension(download_url)) { CrxInstaller::InstallUserScript( full_path, download_url, @@ -1477,7 +1477,7 @@ bool DownloadManager::IsExtensionInstall(const DownloadItem* item) { if (item->save_as()) return false; - if (UserScript::HasUserScriptFileExtension(item->original_name())) + if (UserScript::HasUserScriptFileExtension(item->url())) return true; return item->mime_type() == Extension::kMimeType; @@ -1487,7 +1487,7 @@ bool DownloadManager::IsExtensionInstall(const DownloadCreateInfo* info) { if (info->save_as) return false; - if (UserScript::HasUserScriptFileExtension(info->path)) + if (UserScript::HasUserScriptFileExtension(info->url)) return true; return info->mime_type == Extension::kMimeType; |