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

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

Issue 8762007: Implement a whitelist for code-signing certificates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unittest Created 9 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/download_protection_service.h
diff --git a/chrome/browser/safe_browsing/download_protection_service.h b/chrome/browser/safe_browsing/download_protection_service.h
index 80d988bcf282e283f0fd6d04df9d4a9c570ecb68..93ea128e1fcb6a515419c500bca39afae3075793 100644
--- a/chrome/browser/safe_browsing/download_protection_service.h
+++ b/chrome/browser/safe_browsing/download_protection_service.h
@@ -25,6 +25,7 @@ class SafeBrowsingService;
namespace net {
class URLRequestContextGetter;
+class X509Certificate;
} // namespace net
namespace safe_browsing {
@@ -139,7 +140,6 @@ class DownloadProtectionService {
CheckClientDownloadFetchFailed);
FRIEND_TEST_ALL_PREFIXES(DownloadProtectionServiceTest,
TestDownloadRequestTimeout);
-
static const char kDownloadRequestUrl[];
// Cancels all requests in |download_requests_|, and empties it, releasing
@@ -153,6 +153,14 @@ class DownloadProtectionService {
static void FillDownloadInfo(const DownloadItem& item,
DownloadInfo* download_info);
+ // Given a certificate and its immediate issuer certificate, generates the
+ // list of strings that need to be checked against the download whitelist to
+ // determine whether the certificate is whitelisted.
+ static void GetCertificateWhitelistStrings(
+ const net::X509Certificate& certificate,
+ const net::X509Certificate& issuer,
+ std::vector<std::string>* whitelist_strings);
+
// This pointer may be NULL if SafeBrowsing is disabled. The
// SafeBrowsingService owns us, so we don't need to hold a reference to it.
SafeBrowsingService* sb_service_;

Powered by Google App Engine
This is Rietveld 408576698