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

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: rsleevi's comments: fix threading bug and add comments Created 5 years, 10 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 dac5ab41a2f8050a7f99685cf017b820cde0716b..29a7568224bb803cc1c9c80e76f1c1ebbf080577 100644
--- a/chrome/browser/ssl/ssl_blocking_page.h
+++ b/chrome/browser/ssl/ssl_blocking_page.h
@@ -15,6 +15,7 @@
#include "chrome/browser/interstitials/security_interstitial_metrics_helper.h"
#include "chrome/browser/interstitials/security_interstitial_page.h"
#include "net/ssl/ssl_info.h"
+#include "net/url_request/url_request_context_getter.h"
Ryan Sleevi 2015/02/27 00:46:33 Forward declare
estark 2015/02/27 02:49:37 Just removed the #include all together because I m
#include "url/gurl.h"
#if defined(ENABLE_EXTENSIONS)
@@ -30,16 +31,20 @@ class SSLErrorClassification;
// It deletes itself when the interstitial page is closed.
class SSLBlockingPage : public SecurityInterstitialPage {
public:
- // These represent the commands sent from the interstitial JavaScript. They
- // are defined in chrome/browser/resources/ssl/ssl_errors_common.js.
- // DO NOT reorder or change these without also changing the JavaScript!
+ // These represent the commands sent from the interstitial
+ // JavaScript. They are defined in
+ // chrome/browser/resources/security_warnings/ssl_errors_common.js.
+ // DO NOT reorder or change these without also changing the
+ // JavaScript!
enum SSLBlockingPageCommands {
CMD_DONT_PROCEED = 0,
CMD_PROCEED = 1,
CMD_MORE = 2,
CMD_RELOAD = 3,
CMD_HELP = 4,
- CMD_CLOCK = 5
+ CMD_CLOCK = 5,
+ CMD_DO_REPORT = 6,
+ CMD_DONT_REPORT = 7
};
enum SSLBlockingPageOptionsMask {
@@ -91,6 +96,10 @@ class SSLBlockingPage : public SecurityInterstitialPage {
void PopulateInterstitialStrings(
base::DictionaryValue* load_time_data) override;
+ // SecurityInterstitialPageWithExtendedReporting implementation:
+ void PopulateExtendedReportingOption(
+ base::DictionaryValue* load_time_data) override;
+
private:
void NotifyDenyCertificate();
void NotifyAllowCertificate();
@@ -98,6 +107,17 @@ class SSLBlockingPage : public SecurityInterstitialPage {
std::string GetUmaHistogramPrefix() const;
std::string GetSamplingEventName() const;
+ // Send a report about an invalid certificate to the server (by
+ // posting a FinishCertCollectionInternal task to the IO thread).
+ void FinishCertCollection();
+
+ // The method that actually sends the cert collection report over the
+ // network. Must be called only on the IO thread.
+ static void FinishCertCollectionInternal(
+ scoped_refptr<net::URLRequestContextGetter> request_context_getter,
Ryan Sleevi 2015/02/27 00:46:33 This should be "const scoped_refptr<net::URLReques
estark 2015/02/27 02:49:37 Done.
+ const std::string& hostname,
+ const net::SSLInfo& ssl_info);
+
base::Callback<void(bool)> callback_;
const int cert_error_;

Powered by Google App Engine
This is Rietveld 408576698