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

Unified Diff: chrome/browser/net/certificate_error_reporter.cc

Issue 935663004: Add checkbox for reporting invalid TLS/SSL cert chains (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set callback to DoNothing close to where it's used 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/net/certificate_error_reporter.cc
diff --git a/chrome/browser/net/certificate_error_reporter.cc b/chrome/browser/net/certificate_error_reporter.cc
index 57e737fce6d530e8c87fdbab7736527ab0d8a418..6c00c4bf07f7528a72113744e1e01bd42a4fee5c 100644
--- a/chrome/browser/net/certificate_error_reporter.cc
+++ b/chrome/browser/net/certificate_error_reporter.cc
@@ -20,6 +20,10 @@
namespace chrome_browser_net {
+// URL to upload invalid certificate chain reports
+// TODO(estark): Fill this in with the real URL when live.
+const char kExtendedReportingUploadUrl[] = "http://example.test";
+
CertificateErrorReporter::CertificateErrorReporter(
net::URLRequestContext* request_context,
const GURL& upload_url)
@@ -27,6 +31,10 @@ CertificateErrorReporter::CertificateErrorReporter(
DCHECK(!upload_url.is_empty());
}
+CertificateErrorReporter::CertificateErrorReporter(const GURL& upload_url)
+ : CertificateErrorReporter(nullptr, upload_url) {
+}
+
CertificateErrorReporter::~CertificateErrorReporter() {
STLDeleteElements(&inflight_requests_);
}
@@ -34,6 +42,14 @@ CertificateErrorReporter::~CertificateErrorReporter() {
void CertificateErrorReporter::SendReport(ReportType type,
const std::string& hostname,
const net::SSLInfo& ssl_info) {
+ SendReport(type, request_context_, hostname, ssl_info);
+}
+
+void CertificateErrorReporter::SendReport(
+ ReportType type,
+ net::URLRequestContext* request_context,
+ const std::string& hostname,
+ const net::SSLInfo& ssl_info) {
CertLoggerRequest request;
std::string out;

Powered by Google App Engine
This is Rietveld 408576698