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 062c3b99df422f3e03ed7c6d48a01808d0643d96..164e826203853fcdaeb7d80dde43838faecc9df8 100644 |
--- a/chrome/browser/ssl/ssl_blocking_page.h |
+++ b/chrome/browser/ssl/ssl_blocking_page.h |
@@ -43,8 +43,16 @@ class SSLBlockingPage : public SecurityInterstitialPage { |
}; |
enum SSLBlockingPageOptionsMask { |
+ // Indicates whether or not the user could (assuming perfect knowledge) |
+ // successfully override the error and still get the security guarantees |
+ // of TLS. |
OVERRIDABLE = 1 << 0, |
+ // Indicates whether or not the site the user is trying to connect to has |
+ // requested strict enforcement of certificate validation (e.g. with HTTP |
+ // Strict-Transport-Security). |
STRICT_ENFORCEMENT = 1 << 1, |
+ // Indicates whether a user decision had been previously made but the |
+ // decision has expired. |
EXPIRED_BUT_PREVIOUSLY_ALLOWED = 1 << 2 |
}; |
@@ -74,6 +82,11 @@ class SSLBlockingPage : public SecurityInterstitialPage { |
static void SetExtraInfo(base::DictionaryValue* strings, |
const std::vector<base::string16>& extra_info); |
+ static bool IsOverridable(const int options_mask) { |
mmenke
2014/12/09 22:42:26
-const
meacer
2014/12/10 22:48:03
Done.
|
+ return (options_mask & SSLBlockingPage::OVERRIDABLE) && |
+ !(options_mask & SSLBlockingPage::STRICT_ENFORCEMENT); |
mmenke
2014/12/09 22:42:26
Should either be named is_overrideable, or not inl
meacer
2014/12/10 22:48:03
Done.
|
+ } |
+ |
protected: |
// InterstitialPageDelegate implementation. |
void CommandReceived(const std::string& command) override; |