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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 // is responsible for cleaning up the blocking page, otherwise the | 60 // is responsible for cleaning up the blocking page, otherwise the |
61 // interstitial takes ownership when shown. |options_mask| must be a bitwise | 61 // interstitial takes ownership when shown. |options_mask| must be a bitwise |
62 // mask of SSLBlockingPageOptionsMask values. | 62 // mask of SSLBlockingPageOptionsMask values. |
63 SSLBlockingPage(content::WebContents* web_contents, | 63 SSLBlockingPage(content::WebContents* web_contents, |
64 int cert_error, | 64 int cert_error, |
65 const net::SSLInfo& ssl_info, | 65 const net::SSLInfo& ssl_info, |
66 const GURL& request_url, | 66 const GURL& request_url, |
67 int options_mask, | 67 int options_mask, |
68 const base::Time& time_triggered, | 68 const base::Time& time_triggered, |
69 scoped_ptr<SSLCertReporter> ssl_cert_reporter, | 69 scoped_ptr<SSLCertReporter> ssl_cert_reporter, |
70 const base::Callback<void(bool)>& callback); | 70 const base::Callback<void(bool)>& callback, |
71 const GURL& suggested_url); | |
meacer
2015/07/09 17:58:55
As we discussed offline, let's separate UI bits in
Bhanu Dev
2015/07/11 04:00:43
Acknowledged.
| |
71 | 72 |
72 // InterstitialPageDelegate method: | 73 // InterstitialPageDelegate method: |
73 InterstitialPageDelegate::TypeID GetTypeForTesting() const override; | 74 InterstitialPageDelegate::TypeID GetTypeForTesting() const override; |
74 | 75 |
75 // Returns true if |options_mask| refers to an overridable SSL error and | 76 // Returns true if |options_mask| refers to an overridable SSL error and |
76 // if SSL error overriding is allowed by policy. | 77 // if SSL error overriding is allowed by policy. |
77 static bool IsOverridable(int options_mask, const Profile* const profile); | 78 static bool IsOverridable(int options_mask, const Profile* const profile); |
78 | 79 |
79 static bool DoesPolicyAllowDangerOverride(const Profile* const profile); | 80 static bool DoesPolicyAllowDangerOverride(const Profile* const profile); |
80 | 81 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 // expired? | 124 // expired? |
124 const bool expired_but_previously_allowed_; | 125 const bool expired_but_previously_allowed_; |
125 scoped_ptr<SSLErrorClassification> ssl_error_classification_; | 126 scoped_ptr<SSLErrorClassification> ssl_error_classification_; |
126 | 127 |
127 // The time at which the interstitial was triggered. The interstitial | 128 // The time at which the interstitial was triggered. The interstitial |
128 // calculates all times relative to this. | 129 // calculates all times relative to this. |
129 const base::Time time_triggered_; | 130 const base::Time time_triggered_; |
130 | 131 |
131 scoped_ptr<CertReportHelper> cert_report_helper_; | 132 scoped_ptr<CertReportHelper> cert_report_helper_; |
132 | 133 |
134 // Guide the user to this url, when there is a common name mismatch error | |
135 // and it can be handled. | |
136 const GURL& suggested_url_; | |
meacer
2015/07/09 17:58:55
Keep a copy instead of a reference.
Bhanu Dev
2015/07/11 04:00:43
Done.
| |
137 | |
133 // Which type of interstitial this is. | 138 // Which type of interstitial this is. |
134 enum SSLInterstitialReason { | 139 enum SSLInterstitialReason { |
135 SSL_REASON_SSL, | 140 SSL_REASON_SSL, |
136 SSL_REASON_BAD_CLOCK | 141 SSL_REASON_BAD_CLOCK |
137 } interstitial_reason_; | 142 } interstitial_reason_; |
138 | 143 |
139 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); | 144 DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); |
140 }; | 145 }; |
141 | 146 |
142 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ | 147 #endif // CHROME_BROWSER_SSL_SSL_BLOCKING_PAGE_H_ |
OLD | NEW |