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

Unified Diff: chrome/browser/net/certificate_error_reporter.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: fix comment typo 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.h
diff --git a/chrome/browser/net/certificate_error_reporter.h b/chrome/browser/net/certificate_error_reporter.h
index 5463d5a74bd69d6286bbb8cbe1115fc78e8bcd41..58f8613b88c7fd0f128f9034714e23eaa2808e23 100644
--- a/chrome/browser/net/certificate_error_reporter.h
+++ b/chrome/browser/net/certificate_error_reporter.h
@@ -10,9 +10,14 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "net/url_request/url_request.h"
#include "url/gurl.h"
+namespace content {
+class WebContents;
+}
+
namespace net {
class URLRequestContext;
class SSLInfo;
@@ -22,6 +27,8 @@ namespace chrome_browser_net {
class CertLoggerRequest;
+extern const char kExtendedReportingUploadUrl[];
+
// Provides functionality for sending reports about invalid SSL
// certificate chains to a report collection server.
class CertificateErrorReporter : public net::URLRequest::Delegate {
@@ -44,7 +51,7 @@ class CertificateErrorReporter : public net::URLRequest::Delegate {
~CertificateErrorReporter() override;
- // Construct, serialize, and send a certificate reporter to the report
+ // Construct, serialize, and send a certificate report to the report
// collection server containing the |ssl_info| associated with a
// connection to |hostname|.
virtual void SendReport(ReportType type,
@@ -55,6 +62,8 @@ class CertificateErrorReporter : public net::URLRequest::Delegate {
void OnResponseStarted(net::URLRequest* request) override;
void OnReadCompleted(net::URLRequest* request, int bytes_read) override;
+ base::WeakPtr<CertificateErrorReporter> GetWeakPtr();
+
private:
// Create a URLRequest with which to send a certificate report to the
// server.
@@ -79,6 +88,8 @@ class CertificateErrorReporter : public net::URLRequest::Delegate {
// Owns the contained requests.
std::set<net::URLRequest*> inflight_requests_;
+ base::WeakPtrFactory<CertificateErrorReporter> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(CertificateErrorReporter);
};

Powered by Google App Engine
This is Rietveld 408576698