OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "components/security_state/content/content_utils.h" | 5 #include "components/security_state/content/content_utils.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 l10n_util::GetStringUTF8( | 204 l10n_util::GetStringUTF8( |
205 IDS_PRIVATE_USER_DATA_INPUT_FUTURE_DESCRIPTION))); | 205 IDS_PRIVATE_USER_DATA_INPUT_FUTURE_DESCRIPTION))); |
206 } | 206 } |
207 | 207 |
208 security_style_explanations->ran_insecure_content_style = | 208 security_style_explanations->ran_insecure_content_style = |
209 SecurityLevelToSecurityStyle(security_state::kRanInsecureContentLevel); | 209 SecurityLevelToSecurityStyle(security_state::kRanInsecureContentLevel); |
210 security_style_explanations->displayed_insecure_content_style = | 210 security_style_explanations->displayed_insecure_content_style = |
211 SecurityLevelToSecurityStyle( | 211 SecurityLevelToSecurityStyle( |
212 security_state::kDisplayedInsecureContentLevel); | 212 security_state::kDisplayedInsecureContentLevel); |
213 | 213 |
| 214 if (security_info.malicious_content_status != |
| 215 security_state::MALICIOUS_CONTENT_STATUS_NONE) { |
| 216 security_style_explanations->summary = |
| 217 l10n_util::GetStringUTF8(IDS_SAFEBROWSING_WARNING); |
| 218 } |
| 219 |
214 // Check if the page is HTTP; if so, no more explanations are needed. Note | 220 // Check if the page is HTTP; if so, no more explanations are needed. Note |
215 // that SecurityStyleUnauthenticated does not necessarily mean that | 221 // that SecurityStyleUnauthenticated does not necessarily mean that |
216 // the page is loaded over HTTP, because the security style merely | 222 // the page is loaded over HTTP, because the security style merely |
217 // represents how the embedder wishes to display the security state of | 223 // represents how the embedder wishes to display the security state of |
218 // the page, and the embedder can choose to display HTTPS page as HTTP | 224 // the page, and the embedder can choose to display HTTPS page as HTTP |
219 // if it wants to (for example, displaying deprecated crypto | 225 // if it wants to (for example, displaying deprecated crypto |
220 // algorithms with the same UI treatment as HTTP pages). | 226 // algorithms with the same UI treatment as HTTP pages). |
221 security_style_explanations->scheme_is_cryptographic = | 227 security_style_explanations->scheme_is_cryptographic = |
222 security_info.scheme_is_cryptographic; | 228 security_info.scheme_is_cryptographic; |
223 if (!security_info.scheme_is_cryptographic) { | 229 if (!security_info.scheme_is_cryptographic) { |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 security_style_explanations->info_explanations.push_back( | 320 security_style_explanations->info_explanations.push_back( |
315 content::SecurityStyleExplanation( | 321 content::SecurityStyleExplanation( |
316 "Public-Key Pinning Bypassed", | 322 "Public-Key Pinning Bypassed", |
317 "Public-key pinning was bypassed by a local root certificate.")); | 323 "Public-key pinning was bypassed by a local root certificate.")); |
318 } | 324 } |
319 | 325 |
320 return security_style; | 326 return security_style; |
321 } | 327 } |
322 | 328 |
323 } // namespace security_state | 329 } // namespace security_state |
OLD | NEW |