diff options
author | rolandsteiner@chromium.org <rolandsteiner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-13 06:39:56 +0000 |
---|---|---|
committer | rolandsteiner@chromium.org <rolandsteiner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-13 06:39:56 +0000 |
commit | 92e11c872d8f8e0fc33b1d385cc74b9081445091 (patch) | |
tree | a2868288ec13c967cff87bf5328cc6e8bf935dc5 /chrome/browser/download/download_manager.cc | |
parent | 1a8a3929dfd29e4b697b0ea844cb3d6cabf65bc1 (diff) | |
download | chromium_src-92e11c872d8f8e0fc33b1d385cc74b9081445091.zip chromium_src-92e11c872d8f8e0fc33b1d385cc74b9081445091.tar.gz chromium_src-92e11c872d8f8e0fc33b1d385cc74b9081445091.tar.bz2 |
Fix by gdk (Garret Kelly)
Resolve issue 30641
Extension files were being selected for auto-open even though an install of the
extension was not requested. This patch changes this behaviour so that download
an extension (that's not explicitly requested as an extension install) does not
force an attempt to install it.
BUG=30641
TEST=Right-click an extension link and "Save Link As...". Download appears in shelf.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36106 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_manager.cc')
-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 ed0149b..04c3b8a 100644 --- a/chrome/browser/download/download_manager.cc +++ b/chrome/browser/download/download_manager.cc @@ -1312,16 +1312,16 @@ void DownloadManager::OpenFilesBasedOnExtension( bool DownloadManager::ShouldOpenFileBasedOnExtension( const FilePath& path) const { - // Special-case Chrome extensions as always-open. FilePath::StringType extension = path.Extension(); if (extension.empty()) return false; if (IsExecutableExtension(extension)) return false; + if (Extension::IsExtension(path)) + return false; DCHECK(extension[0] == FilePath::kExtensionSeparator); extension.erase(0, 1); - if (auto_open_.find(extension) != auto_open_.end() || - Extension::IsExtension(path)) + if (auto_open_.find(extension) != auto_open_.end()) return true; return false; } |