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

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

Issue 2201213007: Skip cert whitelist checking if download URL matches whitelist and sampled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 4 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
Index: chrome/browser/safe_browsing/download_protection_service.cc
diff --git a/chrome/browser/safe_browsing/download_protection_service.cc b/chrome/browser/safe_browsing/download_protection_service.cc
index 08f9149f0b0ecfc955d110a669694d5eb5554cdd..6bdb383ecbf0e6ca935f53e047e401f05888b33e 100644
--- a/chrome/browser/safe_browsing/download_protection_service.cc
+++ b/chrome/browser/safe_browsing/download_protection_service.cc
@@ -805,13 +805,12 @@ class DownloadProtectionService::CheckClientDownloadRequest
}
}
- bool should_sample_for_certificate = ShouldSampleWhitelistedDownload();
- if (signature_info_.trusted()) {
+ if (!skipped_url_whitelist_ && signature_info_.trusted()) {
for (int i = 0; i < signature_info_.certificate_chain_size(); ++i) {
if (CertificateChainIsWhitelisted(
signature_info_.certificate_chain(i))) {
RecordCountOfWhitelistedDownload(SIGNATURE_WHITELIST);
- if (should_sample_for_certificate) {
+ if (ShouldSampleWhitelistedDownload()) {
skipped_certificate_whitelist_ = true;
break;
} else {

Powered by Google App Engine
This is Rietveld 408576698