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

Unified Diff: chrome/browser/ssl/ssl_blocking_page.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: use SecurityInterstitialMetricsHelper for extended reporting events 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/ssl/ssl_blocking_page.h
diff --git a/chrome/browser/ssl/ssl_blocking_page.h b/chrome/browser/ssl/ssl_blocking_page.h
index 4b9b7f184cbf776ee0ef5ea25089b162a256d90f..4b831deb0b9210f42886d1242ecd8c4c1c028d0a 100644
--- a/chrome/browser/ssl/ssl_blocking_page.h
+++ b/chrome/browser/ssl/ssl_blocking_page.h
@@ -12,7 +12,6 @@
#include "base/strings/string16.h"
#include "base/task/cancelable_task_tracker.h"
#include "base/time/time.h"
-#include "chrome/browser/interstitials/security_interstitial_metrics_helper.h"
#include "chrome/browser/interstitials/security_interstitial_page.h"
#include "net/ssl/ssl_info.h"
#include "url/gurl.h"
@@ -23,6 +22,7 @@ class ExperienceSamplingEvent;
}
#endif
+class SafeBrowsingUIManager;
class SSLErrorClassification;
// This class is responsible for showing/hiding the interstitial page that is
@@ -59,6 +59,7 @@ class SSLBlockingPage : public SecurityInterstitialPage {
const GURL& request_url,
int options_mask,
const base::Time& time_triggered,
+ SafeBrowsingUIManager* safe_browsing_ui_manager,
const base::Callback<void(bool)>& callback);
// InterstitialPageDelegate method:
@@ -80,6 +81,8 @@ class SSLBlockingPage : public SecurityInterstitialPage {
void PopulateInterstitialStrings(
base::DictionaryValue* load_time_data) override;
+ void PopulateExtendedReportingOption(base::DictionaryValue* load_time_data);
+
private:
void NotifyDenyCertificate();
void NotifyAllowCertificate();
@@ -87,6 +90,10 @@ class SSLBlockingPage : public SecurityInterstitialPage {
std::string GetUmaHistogramPrefix() const;
std::string GetSamplingEventName() const;
+ // Send a report about an invalid certificate to the server. Takes
+ // care of calling certificate_report_callback_for_testing_.
+ void FinishCertCollection();
+
base::Callback<void(bool)> callback_;
const int cert_error_;
@@ -106,11 +113,15 @@ class SSLBlockingPage : public SecurityInterstitialPage {
// expired?
const bool expired_but_previously_allowed_;
scoped_ptr<SSLErrorClassification> ssl_error_classification_;
- scoped_ptr<SecurityInterstitialMetricsHelper> metrics_helper_;
+
// The time at which the interstitial was triggered. The interstitial
// calculates all times relative to this.
const base::Time time_triggered_;
+ // For reporting invalid SSL certificates as part of Safe Browsing
+ // Extended Reporting.
+ SafeBrowsingUIManager* safe_browsing_ui_manager_;
+
// Which type of interstitial this is.
enum SSLInterstitialReason {
SSL_REASON_SSL,

Powered by Google App Engine
This is Rietveld 408576698