| 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 CONTENT_PUBLIC_BROWSER_SECURITY_STYLE_EXPLANATIONS_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_SECURITY_STYLE_EXPLANATIONS_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_SECURITY_STYLE_EXPLANATIONS_H_ | 6 #define CONTENT_PUBLIC_BROWSER_SECURITY_STYLE_EXPLANATIONS_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 #include "content/public/browser/security_style_explanation.h" | 11 #include "content/public/browser/security_style_explanation.h" |
| 12 #include "third_party/WebKit/public/platform/WebSecurityStyle.h" | 12 #include "third_party/WebKit/public/platform/WebSecurityStyle.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 // SecurityStyleExplanations contains information about why a particular | 16 // SecurityStyleExplanations contains information about why a particular |
| 17 // SecurityStyle was chosen for a page. This information includes the | 17 // SecurityStyle was chosen for a page. This information includes the |
| 18 // mixed content status of the page and whether the page was loaded over | 18 // mixed content status of the page and whether the page was loaded over |
| 19 // a cryptographically secure transport. Additionally, | 19 // a cryptographically secure transport. Additionally, |
| 20 // SecurityStyleExplanations contains human-readable | 20 // SecurityStyleExplanations contains human-readable |
| 21 // SecurityStyleExplanation objects that the embedder can use to | 21 // SecurityStyleExplanation objects that the embedder can use to |
| 22 // describe embedder-specific security policies. Each | 22 // describe embedder-specific security policies. Each |
| 23 // SecurityStyleExplanation is a single security property of a page (for | 23 // SecurityStyleExplanation is a single security property of a page (for |
| 24 // example, an expired certificate, a valid certificate, or the presence | 24 // example, an expired certificate, a valid certificate, or the presence |
| 25 // of a deprecated crypto algorithm). A single site may have multiple | 25 // of a deprecated crypto algorithm). A single site may have multiple |
| 26 // different explanations of "secure", "warning", "broken", and "info" severity | 26 // different explanations of "secure", "warning", "broken", and "info" severity |
| 27 // levels. | 27 // levels. |
| 28 struct SecurityStyleExplanations { | 28 struct SecurityStyleExplanations { |
| 29 CONTENT_EXPORT SecurityStyleExplanations(); | 29 CONTENT_EXPORT SecurityStyleExplanations(); |
| 30 CONTENT_EXPORT SecurityStyleExplanations( |
| 31 const SecurityStyleExplanations& other); |
| 30 CONTENT_EXPORT ~SecurityStyleExplanations(); | 32 CONTENT_EXPORT ~SecurityStyleExplanations(); |
| 31 | 33 |
| 32 // True if the page was loaded over HTTPS and ran mixed (HTTP) content | 34 // True if the page was loaded over HTTPS and ran mixed (HTTP) content |
| 33 // such as scripts. | 35 // such as scripts. |
| 34 bool ran_mixed_content; | 36 bool ran_mixed_content; |
| 35 // True if the page was loaded over HTTPS and displayed mixed (HTTP) | 37 // True if the page was loaded over HTTPS and displayed mixed (HTTP) |
| 36 // content such as images. | 38 // content such as images. |
| 37 bool displayed_mixed_content; | 39 bool displayed_mixed_content; |
| 38 // True if the page was loaded over HTTPS without certificate errors, | 40 // True if the page was loaded over HTTPS without certificate errors, |
| 39 // but ran subresources, such as scripts, that were loaded over HTTPS | 41 // but ran subresources, such as scripts, that were loaded over HTTPS |
| (...skipping 16 matching lines...) Expand all Loading... |
| 56 // SecurityStyle will be downgraded to Unauthenticated as a result of | 58 // SecurityStyle will be downgraded to Unauthenticated as a result of |
| 57 // displaying insecure content. | 59 // displaying insecure content. |
| 58 blink::WebSecurityStyle ran_insecure_content_style; | 60 blink::WebSecurityStyle ran_insecure_content_style; |
| 59 blink::WebSecurityStyle displayed_insecure_content_style; | 61 blink::WebSecurityStyle displayed_insecure_content_style; |
| 60 | 62 |
| 61 bool scheme_is_cryptographic; | 63 bool scheme_is_cryptographic; |
| 62 | 64 |
| 63 // True if PKP was bypassed due to a local trust anchor. | 65 // True if PKP was bypassed due to a local trust anchor. |
| 64 bool pkp_bypassed; | 66 bool pkp_bypassed; |
| 65 | 67 |
| 68 // User-visible summary of the security style. |
| 69 std::string summary_override; |
| 70 |
| 66 // Explanations corresponding to each security level. The embedder should | 71 // Explanations corresponding to each security level. The embedder should |
| 67 // display explanations in the order: broken, unauthenticated, secure, info. | 72 // display explanations in the order: broken, unauthenticated, secure, info. |
| 68 std::vector<SecurityStyleExplanation> secure_explanations; | 73 std::vector<SecurityStyleExplanation> secure_explanations; |
| 69 std::vector<SecurityStyleExplanation> unauthenticated_explanations; | 74 std::vector<SecurityStyleExplanation> unauthenticated_explanations; |
| 70 std::vector<SecurityStyleExplanation> broken_explanations; | 75 std::vector<SecurityStyleExplanation> broken_explanations; |
| 71 std::vector<SecurityStyleExplanation> info_explanations; | 76 std::vector<SecurityStyleExplanation> info_explanations; |
| 72 }; | 77 }; |
| 73 | 78 |
| 74 } // namespace content | 79 } // namespace content |
| 75 | 80 |
| 76 #endif // CONTENT_PUBLIC_BROWSER_SECURITY_STYLE_EXPLANATION_H_ | 81 #endif // CONTENT_PUBLIC_BROWSER_SECURITY_STYLE_EXPLANATION_H_ |
| OLD | NEW |