| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ | 5 #ifndef CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
| 6 #define CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ | 6 #define CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // shown when a certificate error happens. | 28 // shown when a certificate error happens. |
| 29 // It deletes itself when the interstitial page is closed. | 29 // It deletes itself when the interstitial page is closed. |
| 30 class SSLBlockingPage : public content::InterstitialPageDelegate { | 30 class SSLBlockingPage : public content::InterstitialPageDelegate { |
| 31 public: | 31 public: |
| 32 SSLBlockingPage( | 32 SSLBlockingPage( |
| 33 content::WebContents* web_contents, | 33 content::WebContents* web_contents, |
| 34 int cert_error, | 34 int cert_error, |
| 35 const net::SSLInfo& ssl_info, | 35 const net::SSLInfo& ssl_info, |
| 36 const GURL& request_url, | 36 const GURL& request_url, |
| 37 bool overridable, | 37 bool overridable, |
| 38 bool strict_enforcement, |
| 38 const base::Callback<void(bool)>& callback); | 39 const base::Callback<void(bool)>& callback); |
| 39 virtual ~SSLBlockingPage(); | 40 virtual ~SSLBlockingPage(); |
| 40 | 41 |
| 41 // A method that sets strings in the specified dictionary from the passed | 42 // A method that sets strings in the specified dictionary from the passed |
| 42 // vector so that they can be used to resource the ssl_roadblock.html/ | 43 // vector so that they can be used to resource the ssl_roadblock.html/ |
| 43 // ssl_error.html files. | 44 // ssl_error.html files. |
| 44 // Note: there can be up to 5 strings in |extra_info|. | 45 // Note: there can be up to 5 strings in |extra_info|. |
| 45 static void SetExtraInfo(base::DictionaryValue* strings, | 46 static void SetExtraInfo(base::DictionaryValue* strings, |
| 46 const std::vector<string16>& extra_info); | 47 const std::vector<string16>& extra_info); |
| 47 | 48 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 58 private: | 59 private: |
| 59 void NotifyDenyCertificate(); | 60 void NotifyDenyCertificate(); |
| 60 void NotifyAllowCertificate(); | 61 void NotifyAllowCertificate(); |
| 61 | 62 |
| 62 base::Callback<void(bool)> callback_; | 63 base::Callback<void(bool)> callback_; |
| 63 | 64 |
| 64 content::WebContents* web_contents_; | 65 content::WebContents* web_contents_; |
| 65 int cert_error_; | 66 int cert_error_; |
| 66 net::SSLInfo ssl_info_; | 67 net::SSLInfo ssl_info_; |
| 67 GURL request_url_; | 68 GURL request_url_; |
| 68 // Is the certificate error overridable or fatal? | 69 // Could the user successfully override the error? |
| 69 bool overridable_; | 70 bool overridable_; |
| 71 // Has the site requested strict enforcement of certificate errors? |
| 72 bool strict_enforcement_; |
| 70 content::InterstitialPage* interstitial_page_; // Owns us. | 73 content::InterstitialPage* interstitial_page_; // Owns us. |
| 71 | 74 |
| 72 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); | 75 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); |
| 73 }; | 76 }; |
| 74 | 77 |
| 75 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ | 78 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
| OLD | NEW |