Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7349)

Unified Diff: chrome/browser/safe_browsing/download_protection_service.cc

Issue 379563006: Merge 281089 "Include the latest binary download info in safe br..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/src/
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/incident_report_uploader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/download_protection_service.cc
===================================================================
--- chrome/browser/safe_browsing/download_protection_service.cc (revision 281829)
+++ chrome/browser/safe_browsing/download_protection_service.cc (working copy)
@@ -56,20 +56,6 @@
"https://sb-ssl.google.com/safebrowsing/clientreport/download";
namespace {
-ClientDownloadRequest::DownloadType GetDownloadType(
- const base::FilePath& file) {
- DCHECK(download_protection_util::IsBinaryFile(file));
- if (file.MatchesExtension(FILE_PATH_LITERAL(".apk")))
- return ClientDownloadRequest::ANDROID_APK;
- else if (file.MatchesExtension(FILE_PATH_LITERAL(".crx")))
- return ClientDownloadRequest::CHROME_EXTENSION;
- // For zip files, we use the ZIPPED_EXECUTABLE type since we will only send
- // the pingback if we find an executable inside the zip archive.
- else if (file.MatchesExtension(FILE_PATH_LITERAL(".zip")))
- return ClientDownloadRequest::ZIPPED_EXECUTABLE;
- return ClientDownloadRequest::WIN_EXECUTABLE;
-}
-
// List of extensions for which we track some UMA stats.
enum MaliciousExtensionType {
EXTENSION_EXE,
@@ -477,7 +463,7 @@
*reason = REASON_NOT_BINARY_FILE;
return false;
}
- *type = GetDownloadType(target_path);
+ *type = download_protection_util::GetDownloadType(target_path);
return true;
}
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/incident_report_uploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698