Bug 1013558: ApplicationReputation should block if verdict is DANGEROUS_HOST (r=gcp)

This commit is contained in:
Monica Chew
2014-06-27 13:56:18 -07:00
parent 94dd112061
commit f4fe7e0448
4 changed files with 1698 additions and 4300 deletions

View File

@@ -980,12 +980,17 @@ PendingLookup::OnStopRequestInternal(nsIRequest *aRequest,
return NS_ERROR_CANNOT_CONVERT_DATA;
}
// There are several more verdicts, but we only respect one for now and treat
// everything else as SAFE.
// There are several more verdicts, but we only respect DANGEROUS and
// DANGEROUS_HOST for now and treat everything else as SAFE.
Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_SERVER,
SERVER_RESPONSE_VALID);
if (response.verdict() == safe_browsing::ClientDownloadResponse::DANGEROUS) {
*aShouldBlock = true;
switch(response.verdict()) {
case safe_browsing::ClientDownloadResponse::DANGEROUS:
case safe_browsing::ClientDownloadResponse::DANGEROUS_HOST:
*aShouldBlock = true;
break;
default:
break;
}
return NS_OK;