OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ | 5 #ifndef COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ |
6 #define COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ | 6 #define COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "net/cert/cert_status_flags.h" | 9 #include "net/cert/cert_status_flags.h" |
10 #include "net/cert/sct_status_flags.h" | 10 #include "net/cert/sct_status_flags.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 struct SecurityInfo { | 89 struct SecurityInfo { |
90 SecurityInfo(); | 90 SecurityInfo(); |
91 ~SecurityInfo(); | 91 ~SecurityInfo(); |
92 SecurityLevel security_level; | 92 SecurityLevel security_level; |
93 // True if the page fails the browser's malware or phishing checks. | 93 // True if the page fails the browser's malware or phishing checks. |
94 bool fails_malware_check; | 94 bool fails_malware_check; |
95 SHA1DeprecationStatus sha1_deprecation_status; | 95 SHA1DeprecationStatus sha1_deprecation_status; |
96 // |mixed_content_status| describes the presence of content that was | 96 // |mixed_content_status| describes the presence of content that was |
97 // loaded over a nonsecure (HTTP) connection. | 97 // loaded over a nonsecure (HTTP) connection. |
98 ContentStatus mixed_content_status; | 98 ContentStatus mixed_content_status; |
| 99 // |content_with_cert_errors_status| describes the presence of |
| 100 // content that was loaded over an HTTPS connection with |
| 101 // certificate errors. |
| 102 ContentStatus content_with_cert_errors_status; |
99 // The verification statuses of the signed certificate timestamps | 103 // The verification statuses of the signed certificate timestamps |
100 // for the connection. | 104 // for the connection. |
101 std::vector<net::ct::SCTVerifyStatus> sct_verify_statuses; | 105 std::vector<net::ct::SCTVerifyStatus> sct_verify_statuses; |
102 bool scheme_is_cryptographic; | 106 bool scheme_is_cryptographic; |
103 net::CertStatus cert_status; | 107 net::CertStatus cert_status; |
104 int cert_id; | 108 int cert_id; |
105 // The security strength, in bits, of the SSL cipher suite. In late | 109 // The security strength, in bits, of the SSL cipher suite. In late |
106 // 2015, 128 is considered the minimum. | 110 // 2015, 128 is considered the minimum. |
107 // 0 means the connection is not encrypted. | 111 // 0 means the connection is not encrypted. |
108 // -1 means the security strength is unknown. | 112 // -1 means the security strength is unknown. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 net::CertStatus cert_status; | 144 net::CertStatus cert_status; |
141 int connection_status; | 145 int connection_status; |
142 int security_bits; | 146 int security_bits; |
143 // The verification statuses of the Signed Certificate | 147 // The verification statuses of the Signed Certificate |
144 // Timestamps (if any) that the server provided. | 148 // Timestamps (if any) that the server provided. |
145 std::vector<net::ct::SCTVerifyStatus> sct_verify_statuses; | 149 std::vector<net::ct::SCTVerifyStatus> sct_verify_statuses; |
146 // True if the page displayed passive mixed content. | 150 // True if the page displayed passive mixed content. |
147 bool displayed_mixed_content; | 151 bool displayed_mixed_content; |
148 // True if the page ran active mixed content. | 152 // True if the page ran active mixed content. |
149 bool ran_mixed_content; | 153 bool ran_mixed_content; |
| 154 // True if the page displayed passive subresources with certificate errors. |
| 155 bool displayed_content_with_cert_errors; |
| 156 // True if the page ran active subresources with certificate errors. |
| 157 bool ran_content_with_cert_errors; |
150 // True if PKP was bypassed due to a local trust anchor. | 158 // True if PKP was bypassed due to a local trust anchor. |
151 bool pkp_bypassed; | 159 bool pkp_bypassed; |
152 }; | 160 }; |
153 | 161 |
154 // These security levels describe the treatment given to pages that | 162 // These security levels describe the treatment given to pages that |
155 // display and run mixed content. They are used to coordinate the | 163 // display and run mixed content. They are used to coordinate the |
156 // treatment of mixed content with other security UI elements. | 164 // treatment of mixed content with other security UI elements. |
157 static const SecurityLevel kDisplayedInsecureContentLevel; | 165 static const SecurityLevel kDisplayedInsecureContentLevel; |
158 static const SecurityLevel kRanInsecureContentLevel; | 166 static const SecurityLevel kRanInsecureContentLevel; |
159 | 167 |
(...skipping 15 matching lines...) Expand all Loading... |
175 mutable VisibleSecurityState visible_security_state_; | 183 mutable VisibleSecurityState visible_security_state_; |
176 | 184 |
177 SecurityStateModelClient* client_; | 185 SecurityStateModelClient* client_; |
178 | 186 |
179 DISALLOW_COPY_AND_ASSIGN(SecurityStateModel); | 187 DISALLOW_COPY_AND_ASSIGN(SecurityStateModel); |
180 }; | 188 }; |
181 | 189 |
182 } // namespace security_state | 190 } // namespace security_state |
183 | 191 |
184 #endif // COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ | 192 #endif // COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ |
OLD | NEW |