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

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

Issue 450833002: Add additional UMA stats for remembering certificate decisions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes from sky Created 6 years, 4 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
« no previous file with comments | « chrome/browser/ssl/chrome_ssl_host_state_delegate_test.cc ('k') | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 009fdf9651e886654824aaca6152196c0398a9f1..f94e69958baba40dddf7961ac508b83492a3c55d 100644
--- a/chrome/browser/ssl/ssl_blocking_page.h
+++ b/chrome/browser/ssl/ssl_blocking_page.h
@@ -48,6 +48,12 @@ class SSLBlockingPage : public content::InterstitialPageDelegate,
CMD_CLOCK = 5
};
+ enum SSLBlockingPageOptionsMask {
+ OVERRIDABLE = 1 << 0,
+ STRICT_ENFORCEMENT = 1 << 1,
+ EXPIRED_BUT_PREVIOUSLY_ALLOWED = 1 << 2
+ };
+
virtual ~SSLBlockingPage();
// Create an interstitial and show it.
@@ -55,15 +61,14 @@ class SSLBlockingPage : public content::InterstitialPageDelegate,
// Creates an SSL blocking page. If the blocking page isn't shown, the caller
// is responsible for cleaning up the blocking page, otherwise the
- // interstitial takes ownership when shown.
- SSLBlockingPage(
- content::WebContents* web_contents,
- int cert_error,
- const net::SSLInfo& ssl_info,
- const GURL& request_url,
- bool overridable,
- bool strict_enforcement,
- const base::Callback<void(bool)>& callback);
+ // interstitial takes ownership when shown. |options_mask| must be a bitwise
+ // mask of SSLBlockingPageOptionsMask values.
+ SSLBlockingPage(content::WebContents* web_contents,
+ int cert_error,
+ const net::SSLInfo& ssl_info,
+ const GURL& request_url,
+ int options_mask,
+ const base::Callback<void(bool)>& callback);
// A method that sets strings in the specified dictionary from the passed
// vector so that they can be used to resource the ssl_roadblock.html/
@@ -98,13 +103,13 @@ class SSLBlockingPage : public content::InterstitialPageDelegate,
base::Callback<void(bool)> callback_;
content::WebContents* web_contents_;
- int cert_error_;
+ const int cert_error_;
const net::SSLInfo ssl_info_;
- GURL request_url_;
+ const GURL request_url_;
// Could the user successfully override the error?
- bool overridable_;
+ const bool overridable_;
felt 2014/08/12 19:37:34 overridable_ can't be const, its value might chang
// Has the site requested strict enforcement of certificate errors?
- bool strict_enforcement_;
+ const bool strict_enforcement_;
content::InterstitialPage* interstitial_page_; // Owns us.
// Is the hostname for an internal network?
bool internal_;
@@ -120,6 +125,9 @@ class SSLBlockingPage : public content::InterstitialPageDelegate,
bool captive_portal_no_response_;
// Was a captive portal detected?
bool captive_portal_detected_;
+ // Did the user previously allow a bad certificate but the decision has now
+ // expired?
+ const bool expired_but_previously_allowed_;
content::NotificationRegistrar registrar_;
« no previous file with comments | « chrome/browser/ssl/chrome_ssl_host_state_delegate_test.cc ('k') | chrome/browser/ssl/ssl_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698