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

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

Issue 1076273002: Add interstitial info to certificate reports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 3c20ec1c607abe8bd12edc60e4caa39973808ab6..30d95e41f75b64332e6916d422e24e85b6b2ac59 100644
--- a/chrome/browser/net/certificate_error_reporter.h
+++ b/chrome/browser/net/certificate_error_reporter.h
@@ -40,6 +40,9 @@ class CertificateErrorReporter : public net::URLRequest::Delegate {
// to the server.
enum CookiesPreference { SEND_COOKIES, DO_NOT_SEND_COOKIES };
+ enum ProceedDecision { USER_PROCEEDED, USER_DID_NOT_PROCEED };
+ enum Overridable { OVERRIDABLE, NOT_OVERRIDABLE };
Ryan Sleevi 2015/04/16 01:44:10 First scan: This seems to introduce awareness of i
estark 2015/04/16 02:09:31 Agreed. As I mentioned, I wasn't sure how to avoid
+
// Create a certificate error reporter that will send certificate
// error reports to |upload_url|, using |request_context| as the
// context for the reports. |cookies_preference| controls whether
@@ -58,6 +61,7 @@ class CertificateErrorReporter : public net::URLRequest::Delegate {
// responsible for enforcing any preconditions (such as obtaining user
// opt-in, only sending reports for certain hostnames, checking for
// incognito mode, etc.).
+ virtual void SendReport(ReportType type, const CertLoggerRequest& report);
Ryan Sleevi 2015/04/16 01:44:10 Virtuals + overloads = special place in hell when
virtual void SendReport(ReportType type,
const std::string& hostname,
const net::SSLInfo& ssl_info);
@@ -66,6 +70,18 @@ class CertificateErrorReporter : public net::URLRequest::Delegate {
void OnResponseStarted(net::URLRequest* request) override;
void OnReadCompleted(net::URLRequest* request, int bytes_read) override;
+ // Populate the CertLoggerRequest for a report.
Ryan Sleevi 2015/04/16 01:44:10 By making this public, this is beginning to violat
+ static void BuildReport(const std::string& hostname,
+ const net::SSLInfo& ssl_info,
+ CertLoggerRequest* out_request);
+ static void BuildReport(const std::string& hostname,
Ryan Sleevi 2015/04/16 01:44:10 ditto overloads again
+ const net::SSLInfo& ssl_info,
+ uint32 validation_result,
+ uint32 interstitial_reason,
+ ProceedDecision proceed_decision,
+ Overridable overridable,
+ CertLoggerRequest* out_request);
+
private:
// Create a URLRequest with which to send a certificate report to the
// server.
@@ -76,11 +92,6 @@ class CertificateErrorReporter : public net::URLRequest::Delegate {
// collection server.
void SendCertLoggerRequest(const CertLoggerRequest& request);
- // Populate the CertLoggerRequest for a report.
- static void BuildReport(const std::string& hostname,
- const net::SSLInfo& ssl_info,
- CertLoggerRequest* out_request);
-
// Performs post-report cleanup.
void RequestComplete(net::URLRequest* request);

Powered by Google App Engine
This is Rietveld 408576698