diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-06 23:49:13 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-06 23:49:13 +0000 |
commit | cd448093b26be45c8e32696a83dc0bbd5504eb22 (patch) | |
tree | d6071377e41bdb80efba231c0cf8fa90b4ad7f49 /chrome/browser/download/download_util.h | |
parent | 1d11be7dc39b207e0ab43508771b2ffd1d205e07 (diff) | |
download | chromium_src-cd448093b26be45c8e32696a83dc0bbd5504eb22.zip chromium_src-cd448093b26be45c8e32696a83dc0bbd5504eb22.tar.gz chromium_src-cd448093b26be45c8e32696a83dc0bbd5504eb22.tar.bz2 |
Modify the "dangerous download" algorithm as follows. Original patch by Pierre-Antoine LaFayette (see http://codereview.chromium.org/1403001/ ), r=me,brettw,aa.
Downloads are considered dangerous if:
a) The file is dangerous just by sitting on the drive, without needing to be clicked on e.g. dll, xbap
b) The file is executable and the download was not user initiated.
c) They are an extension that is not from the gallery
We have defined a user initiated download as 3 possible cases:
a) A user enters a URL into the address bar that is a file
b) A user left clicks on a URL that is a file
c) A user right clicks and does "Save As" on a URL that is a file.
BUG=9044
TEST=Open a page with a download link to a dangerous file that is not an extension, e.g. an .exe file, and left click on the link. The download should proceed without a prompt.
Review URL: http://codereview.chromium.org/5603008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68406 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_util.h')
-rw-r--r-- | chrome/browser/download/download_util.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/chrome/browser/download/download_util.h b/chrome/browser/download/download_util.h index 0224a26..0a0bd90 100644 --- a/chrome/browser/download/download_util.h +++ b/chrome/browser/download/download_util.h @@ -150,17 +150,6 @@ void DragDownload(const DownloadItem* download, SkBitmap* icon, gfx::NativeView view); -// Executable file support ----------------------------------------------------- - -// Tests if a file is considered executable, based on its type. -bool IsExecutableFile(const FilePath& path); - -// Determine if the specified extension is an executable extension. -bool IsExecutableExtension(const FilePath::StringType& extension); - -// Tests if we think the server means for this mime_type to be executable. -bool IsExecutableMimeType(const std::string& mime_type); - // Helpers --------------------------------------------------------------------- // Creates a representation of a download in a format that the downloads |