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

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

Issue 1076273002: Add interstitial info to certificate reports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: redo based on refactoring in crrev.com/1117173004 Created 5 years, 7 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/certificate_error_report.cc
diff --git a/chrome/browser/ssl/certificate_error_report.cc b/chrome/browser/ssl/certificate_error_report.cc
index 3862621c2fdf3a9214053e2a1a70e7fcdad64706..b54a8671d2ab361b00452c26dae22a86511509e5 100644
--- a/chrome/browser/ssl/certificate_error_report.cc
+++ b/chrome/browser/ssl/certificate_error_report.cc
@@ -87,6 +87,32 @@ bool CertificateErrorReport::Serialize(std::string* output) const {
return cert_report_->SerializeToString(output);
}
+void CertificateErrorReport::SetInterstitialInfo(
+ const InterstitialReason& interstitial_reason,
+ const ProceedDecision& proceed_decision,
+ const Overridable& overridable) {
+ CertLoggerInterstitialInfo* interstitial_info =
+ cert_report_->mutable_interstitial_info();
+
+ switch (interstitial_reason) {
+ case INTERSTITIAL_SSL:
+ interstitial_info->set_interstitial_reason(
+ CertLoggerInterstitialInfo::INTERSTITIAL_SSL);
+ break;
+ case INTERSTITIAL_CAPTIVE_PORTAL:
+ interstitial_info->set_interstitial_reason(
+ CertLoggerInterstitialInfo::INTERSTITIAL_CAPTIVE_PORTAL);
+ break;
+ case INTERSTITIAL_CLOCK:
+ interstitial_info->set_interstitial_reason(
+ CertLoggerInterstitialInfo::INTERSTITIAL_CLOCK);
+ break;
+ }
+
+ interstitial_info->set_user_proceeded(proceed_decision == USER_PROCEEDED);
+ interstitial_info->set_overridable(overridable == INTERSTITIAL_OVERRIDABLE);
+}
+
const std::string& CertificateErrorReport::hostname() const {
return cert_report_->hostname();
}

Powered by Google App Engine
This is Rietveld 408576698