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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/last_download_finder.cc

Issue 1441243002: Be more lenient about inspecting/pinging on invalid downloaded .zip's (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust proto tag number to match server side. Created 5 years, 1 month 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
Index: chrome/browser/safe_browsing/incident_reporting/last_download_finder.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/last_download_finder.cc b/chrome/browser/safe_browsing/incident_reporting/last_download_finder.cc
index a78f4598097ea7533302eca2bea2382b8a9c3cf2..cb7639badf8292b25392368376ccf0839924aa9e 100644
--- a/chrome/browser/safe_browsing/incident_reporting/last_download_finder.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/last_download_finder.cc
@@ -50,12 +50,13 @@ int64 GetEndTime(const ClientIncidentReport_DownloadDetails& details) {
bool IsBinaryDownloadForCurrentOS(
ClientDownloadRequest::DownloadType download_type) {
static_assert(ClientDownloadRequest::DownloadType_MAX ==
- ClientDownloadRequest::ARCHIVE,
+ ClientDownloadRequest::INVALID_MAC_ARCHIVE,
"Update logic below");
// Platform-specific types are relevant only for their own platforms.
#if defined(OS_MACOSX)
- if (download_type == ClientDownloadRequest::MAC_EXECUTABLE)
+ if (download_type == ClientDownloadRequest::MAC_EXECUTABLE ||
+ download_type == ClientDownloadRequest::INVALID_MAC_ARCHIVE)
return true;
#elif defined(OS_ANDROID)
if (download_type == ClientDownloadRequest::ANDROID_APK)
@@ -70,6 +71,7 @@ bool IsBinaryDownloadForCurrentOS(
if (download_type == ClientDownloadRequest::ZIPPED_EXECUTABLE ||
download_type == ClientDownloadRequest::ZIPPED_ARCHIVE ||
+ download_type == ClientDownloadRequest::INVALID_ZIP ||
download_type == ClientDownloadRequest::ARCHIVE) {
return true;
}
« no previous file with comments | « chrome/browser/safe_browsing/download_protection_service_unittest.cc ('k') | chrome/common/safe_browsing/csd.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698