OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 }; | 49 }; |
50 | 50 |
51 virtual ~SSLBlockingPage(); | 51 virtual ~SSLBlockingPage(); |
52 | 52 |
53 // Create an interstitial and show it. | 53 // Create an interstitial and show it. |
54 void Show(); | 54 void Show(); |
55 | 55 |
56 // Creates an SSL blocking page. If the blocking page isn't shown, the caller | 56 // Creates an SSL blocking page. If the blocking page isn't shown, the caller |
57 // is responsible for cleaning up the blocking page, otherwise the | 57 // is responsible for cleaning up the blocking page, otherwise the |
58 // interstitial takes ownership when shown. | 58 // interstitial takes ownership when shown. |
59 SSLBlockingPage( | 59 SSLBlockingPage(content::WebContents* web_contents, |
60 content::WebContents* web_contents, | 60 int cert_error, |
61 int cert_error, | 61 const net::SSLInfo& ssl_info, |
62 const net::SSLInfo& ssl_info, | 62 const GURL& request_url, |
63 const GURL& request_url, | 63 bool overridable, |
64 bool overridable, | 64 bool strict_enforcement, |
65 bool strict_enforcement, | 65 bool expired_but_previously_allowed, |
66 const base::Callback<void(bool)>& callback); | 66 const base::Callback<void(bool)>& callback); |
67 | 67 |
68 // A method that sets strings in the specified dictionary from the passed | 68 // A method that sets strings in the specified dictionary from the passed |
69 // vector so that they can be used to resource the ssl_roadblock.html/ | 69 // vector so that they can be used to resource the ssl_roadblock.html/ |
70 // ssl_error.html files. | 70 // ssl_error.html files. |
71 // Note: there can be up to 5 strings in |extra_info|. | 71 // Note: there can be up to 5 strings in |extra_info|. |
72 static void SetExtraInfo(base::DictionaryValue* strings, | 72 static void SetExtraInfo(base::DictionaryValue* strings, |
73 const std::vector<base::string16>& extra_info); | 73 const std::vector<base::string16>& extra_info); |
74 | 74 |
75 protected: | 75 protected: |
76 // InterstitialPageDelegate implementation. | 76 // InterstitialPageDelegate implementation. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // Used for getting num_visits_. | 113 // Used for getting num_visits_. |
114 base::CancelableTaskTracker request_tracker_; | 114 base::CancelableTaskTracker request_tracker_; |
115 // Is captive portal detection enabled? | 115 // Is captive portal detection enabled? |
116 bool captive_portal_detection_enabled_; | 116 bool captive_portal_detection_enabled_; |
117 // Did the probe complete before the interstitial was closed? | 117 // Did the probe complete before the interstitial was closed? |
118 bool captive_portal_probe_completed_; | 118 bool captive_portal_probe_completed_; |
119 // Did the captive portal probe receive an error or get a non-HTTP response? | 119 // Did the captive portal probe receive an error or get a non-HTTP response? |
120 bool captive_portal_no_response_; | 120 bool captive_portal_no_response_; |
121 // Was a captive portal detected? | 121 // Was a captive portal detected? |
122 bool captive_portal_detected_; | 122 bool captive_portal_detected_; |
| 123 // Did the user previously allow a bad certificate but the decision has now |
| 124 // expired? |
| 125 bool expired_but_previously_allowed_; |
123 | 126 |
124 content::NotificationRegistrar registrar_; | 127 content::NotificationRegistrar registrar_; |
125 | 128 |
126 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); | 129 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); |
127 }; | 130 }; |
128 | 131 |
129 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ | 132 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
OLD | NEW |