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

Unified Diff: chrome/browser/ssl/ssl_blocking_page.cc

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/ssl/ssl_blocking_page.cc
diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc
index 717d138471713eb07da915cdb63ba5d2d8babbda..1bdd76300c0c49c546a4af6ef78b6a8cdb1c07b5 100644
--- a/chrome/browser/ssl/ssl_blocking_page.cc
+++ b/chrome/browser/ssl/ssl_blocking_page.cc
@@ -26,6 +26,8 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/interstitials/security_interstitial_metrics_helper.h"
+#include "chrome/browser/net/cert_logger.pb.h"
+#include "chrome/browser/net/certificate_error_reporter.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_preferences_util.h"
#include "chrome/browser/ssl/ssl_cert_reporter.h"
@@ -75,6 +77,7 @@
using base::ASCIIToUTF16;
using base::TimeTicks;
+using chrome_browser_net::CertificateErrorReporter;
using content::InterstitialPage;
using content::InterstitialPageDelegate;
using content::NavigationController;
@@ -584,7 +587,7 @@ void SSLBlockingPage::OnProceed() {
// Finish collecting information about invalid certificates, if the
// user opted in to.
- FinishCertCollection();
+ FinishCertCollection(true);
Ryan Sleevi 2015/04/16 01:44:10 Suggestion: Reuse the enum (SecurityInterstitialMe
RecordSSLExpirationPageEventState(
expired_but_previously_allowed_, true, overridable_);
@@ -598,7 +601,7 @@ void SSLBlockingPage::OnDontProceed() {
// Finish collecting information about invalid certificates, if the
// user opted in to.
- FinishCertCollection();
+ FinishCertCollection(false);
RecordSSLExpirationPageEventState(
expired_but_previously_allowed_, false, overridable_);
@@ -647,7 +650,7 @@ std::string SSLBlockingPage::GetSamplingEventName() const {
return event_name;
}
-void SSLBlockingPage::FinishCertCollection() {
+void SSLBlockingPage::FinishCertCollection(bool proceeded) {
if (!ShouldShowCertificateReporterCheckbox())
return;
@@ -661,8 +664,16 @@ void SSLBlockingPage::FinishCertCollection() {
SecurityInterstitialMetricsHelper::EXTENDED_REPORTING_IS_ENABLED);
if (ShouldReportCertificateError()) {
- ssl_cert_reporter_->ReportInvalidCertificateChain(request_url().host(),
- ssl_info_);
+ chrome_browser_net::CertLoggerRequest report;
+ CertificateErrorReporter::BuildReport(
+ request_url().host(), ssl_info_,
+ SSLErrorInfo::NetErrorToErrorType(cert_error_), interstitial_reason_,
+ proceeded ? CertificateErrorReporter::USER_PROCEEDED
+ : CertificateErrorReporter::USER_DID_NOT_PROCEED,
+ overridable_ ? CertificateErrorReporter::OVERRIDABLE
+ : CertificateErrorReporter::NOT_OVERRIDABLE,
+ &report);
+ ssl_cert_reporter_->SendReport(report);
}
}

Powered by Google App Engine
This is Rietveld 408576698