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" |
(...skipping 11 matching lines...) Expand all Loading... |
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(); | 30 CONTENT_EXPORT ~SecurityStyleExplanations(); |
31 | 31 |
32 // True if the page ran insecure content such as scripts. | 32 // True if the page was loaded over HTTPS and ran mixed (HTTP) content |
33 bool ran_insecure_content; | 33 // such as scripts. |
34 // True if the page displayed insecure content such as images. | 34 bool ran_mixed_content; |
35 bool displayed_insecure_content; | 35 // True if the page was loaded over HTTPS and displayed mixed (HTTP) |
| 36 // content such as images. |
| 37 bool displayed_mixed_content; |
| 38 // True if the page was loaded over HTTPS without certificate errors, |
| 39 // but ran subresources, such as scripts, that were loaded over HTTPS |
| 40 // with certificate errors. |
| 41 bool ran_content_with_cert_errors; |
| 42 // True if the page was loaded over HTTPS without certificate errors, |
| 43 // but displayed subresources, such as images, that were loaded over HTTPS |
| 44 // with certificate errors. |
| 45 bool displayed_content_with_cert_errors; |
36 | 46 |
37 // The SecurityStyle assigned to a page that runs or displays insecure | 47 // The SecurityStyle assigned to a page that runs or displays insecure |
38 // content, respectively. These values are used to convey the effect | 48 // content, respectively. Insecure content can be either HTTP |
39 // that mixed content has on the overall SecurityStyle of the page; | 49 // subresources loaded on an HTTPS page (mixed content), or HTTPS |
| 50 // subresources loaded with certificate errors on an HTTPS page. |
| 51 // |
| 52 // These values are used to convey the effect |
| 53 // that insecure content has on the overall SecurityStyle of the page; |
40 // for example, a |displayed_insecure_content_style| value of | 54 // for example, a |displayed_insecure_content_style| value of |
41 // SECURITY_STYLE_UNAUTHENTICATED indicates that the page's overall | 55 // SECURITY_STYLE_UNAUTHENTICATED indicates that the page's overall |
42 // SecurityStyle will be downgraded to UNAUTHENTICATED as a result of | 56 // SecurityStyle will be downgraded to UNAUTHENTICATED as a result of |
43 // displaying insecure content. | 57 // displaying insecure content. |
44 SecurityStyle ran_insecure_content_style; | 58 SecurityStyle ran_insecure_content_style; |
45 SecurityStyle displayed_insecure_content_style; | 59 SecurityStyle displayed_insecure_content_style; |
46 | 60 |
47 bool scheme_is_cryptographic; | 61 bool scheme_is_cryptographic; |
48 | 62 |
49 // True if PKP was bypassed due to a local trust anchor. | 63 // True if PKP was bypassed due to a local trust anchor. |
50 bool pkp_bypassed; | 64 bool pkp_bypassed; |
51 | 65 |
52 // Explanations corresponding to each security level. The embedder should | 66 // Explanations corresponding to each security level. The embedder should |
53 // display explanations in the order: broken, unauthenticated, secure, info. | 67 // display explanations in the order: broken, unauthenticated, secure, info. |
54 std::vector<SecurityStyleExplanation> secure_explanations; | 68 std::vector<SecurityStyleExplanation> secure_explanations; |
55 std::vector<SecurityStyleExplanation> unauthenticated_explanations; | 69 std::vector<SecurityStyleExplanation> unauthenticated_explanations; |
56 std::vector<SecurityStyleExplanation> broken_explanations; | 70 std::vector<SecurityStyleExplanation> broken_explanations; |
57 std::vector<SecurityStyleExplanation> info_explanations; | 71 std::vector<SecurityStyleExplanation> info_explanations; |
58 }; | 72 }; |
59 | 73 |
60 } // namespace content | 74 } // namespace content |
61 | 75 |
62 #endif // CONTENT_PUBLIC_BROWSER_SECURITY_STYLE_EXPLANATION_H_ | 76 #endif // CONTENT_PUBLIC_BROWSER_SECURITY_STYLE_EXPLANATION_H_ |
OLD | NEW |