summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing
diff options
context:
space:
mode:
authornoelutz@google.com <noelutz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-16 05:58:57 +0000
committernoelutz@google.com <noelutz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-16 05:58:57 +0000
commitf71a87878f4f1c2f18d54d989a320fb86864580b (patch)
tree6b4f3355f68db764636f6f9930d30186ecf058b6 /chrome/browser/safe_browsing
parente094256d424f78bbc42c4e6d0b3ea93813b426b4 (diff)
downloadchromium_src-f71a87878f4f1c2f18d54d989a320fb86864580b.zip
chromium_src-f71a87878f4f1c2f18d54d989a320fb86864580b.tar.gz
chromium_src-f71a87878f4f1c2f18d54d989a320fb86864580b.tar.bz2
Add all Microsoft executable extensions to the list of extensions we report as part of the SafeBrowsing download protection features.
BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/10310181 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137369 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing')
-rw-r--r--chrome/browser/safe_browsing/download_protection_service.cc23
1 files changed, 18 insertions, 5 deletions
diff --git a/chrome/browser/safe_browsing/download_protection_service.cc b/chrome/browser/safe_browsing/download_protection_service.cc
index 4217a21..c62bc4a 100644
--- a/chrome/browser/safe_browsing/download_protection_service.cc
+++ b/chrome/browser/safe_browsing/download_protection_service.cc
@@ -47,11 +47,24 @@ const char DownloadProtectionService::kDownloadRequestUrl[] =
namespace {
bool IsBinaryFile(const FilePath& file) {
- return (file.MatchesExtension(FILE_PATH_LITERAL(".exe")) ||
- file.MatchesExtension(FILE_PATH_LITERAL(".cab")) ||
- file.MatchesExtension(FILE_PATH_LITERAL(".msi")) ||
- file.MatchesExtension(FILE_PATH_LITERAL(".crx")) ||
- file.MatchesExtension(FILE_PATH_LITERAL(".apk")));
+ return (
+ // Executable extensions for MS Windows.
+ file.MatchesExtension(FILE_PATH_LITERAL(".bas")) ||
+ file.MatchesExtension(FILE_PATH_LITERAL(".bat")) ||
+ file.MatchesExtension(FILE_PATH_LITERAL(".cab")) ||
+ file.MatchesExtension(FILE_PATH_LITERAL(".cmd")) ||
+ file.MatchesExtension(FILE_PATH_LITERAL(".com")) ||
+ file.MatchesExtension(FILE_PATH_LITERAL(".exe")) ||
+ file.MatchesExtension(FILE_PATH_LITERAL(".hta")) ||
+ file.MatchesExtension(FILE_PATH_LITERAL(".msi")) ||
+ file.MatchesExtension(FILE_PATH_LITERAL(".pif")) ||
+ file.MatchesExtension(FILE_PATH_LITERAL(".reg")) ||
+ file.MatchesExtension(FILE_PATH_LITERAL(".scr")) ||
+ file.MatchesExtension(FILE_PATH_LITERAL(".vb")) ||
+ file.MatchesExtension(FILE_PATH_LITERAL(".vbs")) ||
+ // Chrome extensions and android APKs are also reported.
+ file.MatchesExtension(FILE_PATH_LITERAL(".crx")) ||
+ file.MatchesExtension(FILE_PATH_LITERAL(".apk")));
}
ClientDownloadRequest::DownloadType GetDownloadType(const FilePath& file) {