diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-03 20:43:23 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-03 20:43:23 +0000 |
commit | 266869fcc3ec4e68f7c6f2e7d2060f8f5bb6a9dd (patch) | |
tree | 1d19a09534c9876e5803851fd0a84835658137a4 /chrome/browser/ssl/ssl_blocking_page.h | |
parent | ef3e7220440a9810be9d5ed99a0a109ea044691b (diff) | |
download | chromium_src-266869fcc3ec4e68f7c6f2e7d2060f8f5bb6a9dd.zip chromium_src-266869fcc3ec4e68f7c6f2e7d2060f8f5bb6a9dd.tar.gz chromium_src-266869fcc3ec4e68f7c6f2e7d2060f8f5bb6a9dd.tar.bz2 |
Add an SSLBlockingPage::ErrorLevel enum type to make the
code more readable than using an "overridable" bool argument.
R=jcivelli
BUG=41360
TEST=None. Covered by existing tests.
Review URL: http://codereview.chromium.org/1862002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46271 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl/ssl_blocking_page.h')
-rw-r--r-- | chrome/browser/ssl/ssl_blocking_page.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/chrome/browser/ssl/ssl_blocking_page.h b/chrome/browser/ssl/ssl_blocking_page.h index dd282ad..2f85c07 100644 --- a/chrome/browser/ssl/ssl_blocking_page.h +++ b/chrome/browser/ssl/ssl_blocking_page.h @@ -33,8 +33,15 @@ class SSLBlockingPage : public InterstitialPage { virtual void OnAllowCertificate(SSLCertErrorHandler* handler) = 0; }; + // The severity of the certificate error. + enum ErrorLevel { + ERROR_OVERRIDABLE, // The interstitial page has a "Proceed anyway" button. + ERROR_FATAL, // The interstitial page doesn't allow the user to + // proceed to the site. + }; + SSLBlockingPage(SSLCertErrorHandler* handler, Delegate* delegate, - bool overridable); + ErrorLevel error_level); virtual ~SSLBlockingPage(); // A method that sets strings in the specified dictionary from the passed @@ -53,8 +60,8 @@ class SSLBlockingPage : public InterstitialPage { virtual void DontProceed(); private: - void NotifyDenyCertificate(); - void NotifyAllowCertificate(); + void NotifyDenyCertificate(); + void NotifyAllowCertificate(); // The error we represent. We will either call CancelRequest() or // ContinueRequest() on this object. @@ -67,9 +74,8 @@ class SSLBlockingPage : public InterstitialPage { // A flag to indicate if we've notified |delegate_| of the user's decision. bool delegate_has_been_notified_; - // Can the user override the certificate error? - bool overridable_; - + // Is the certificate error overridable or fatal? + ErrorLevel error_level_; DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); }; |