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

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

Issue 935663004: Add checkbox for reporting invalid TLS/SSL cert chains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert accidental deletion (fixes failing CaptivePortal tests) Created 5 years, 9 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/ping_manager.h
diff --git a/chrome/browser/safe_browsing/ping_manager.h b/chrome/browser/safe_browsing/ping_manager.h
index a33559b532b2fa0951bd966696acb628ff62256d..28c536ce0228c60046659cffec1a11b5ccb6a0ff 100644
--- a/chrome/browser/safe_browsing/ping_manager.h
+++ b/chrome/browser/safe_browsing/ping_manager.h
@@ -18,7 +18,12 @@
#include "net/url_request/url_fetcher_delegate.h"
#include "url/gurl.h"
+namespace chrome_browser_net {
+class CertificateErrorReporter;
+}
+
namespace net {
+class SSLInfo;
class URLRequestContextGetter;
} // namespace net
@@ -49,6 +54,14 @@ class SafeBrowsingPingManager : public net::URLFetcherDelegate {
// malware reports. |report| is the serialized report.
void ReportMalwareDetails(const std::string& report);
+ // Users can opt-in on the SSL interstitial to send reports of invalid
+ // certificate chains.
+ void ReportInvalidCertificateChain(const std::string& hostname,
+ const net::SSLInfo& ssl_info);
+
+ void SetCertificateErrorReporterForTesting(scoped_ptr<
+ chrome_browser_net::CertificateErrorReporter> certificate_error_reporter);
+
private:
FRIEND_TEST_ALL_PREFIXES(SafeBrowsingPingManagerTest,
TestSafeBrowsingHitUrl);
@@ -88,6 +101,10 @@ class SafeBrowsingPingManager : public net::URLFetcherDelegate {
// We add both "hit" and "detail" fetchers in this set.
Reports safebrowsing_reports_;
+ // Sends reports of invalid SSL certificate chains.
+ scoped_ptr<chrome_browser_net::CertificateErrorReporter>
+ certificate_error_reporter_;
+
DISALLOW_COPY_AND_ASSIGN(SafeBrowsingPingManager);
};
« no previous file with comments | « chrome/browser/resources/security_warnings/safe_browsing.js ('k') | chrome/browser/safe_browsing/ping_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698