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

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: use SecurityInterstitialMetricsHelper for extended reporting events 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..d006f866407c04c70673acf2e5375f10aa91130c 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(
+ chrome_browser_net::CertificateErrorReporter* certificate_error_reporter);
mattm 2015/03/23 05:31:17 should be passed as a scoped_ptr since it takes ow
estark 2015/03/23 16:42:13 Done.
+
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);
};

Powered by Google App Engine
This is Rietveld 408576698