Chromium Code Reviews| Index: content/public/common/security_style.h |
| diff --git a/content/public/common/security_style.h b/content/public/common/security_style.h |
| index a0086d5a64ceeb4a987187574d2d66e2bfb8c629..a4c3204f010b190112a668108795c16db7ad1490 100644 |
| --- a/content/public/common/security_style.h |
| +++ b/content/public/common/security_style.h |
| @@ -5,6 +5,9 @@ |
| #ifndef CONTENT_PUBLIC_COMMON_SECURITY_STYLE_H_ |
| #define CONTENT_PUBLIC_COMMON_SECURITY_STYLE_H_ |
| +#include <string> |
| +#include <vector> |
| + |
| namespace content { |
| // Various aspects of the UI change their appearance according to the security |
| @@ -39,6 +42,36 @@ enum SecurityStyle { |
| SECURITY_STYLE_LAST = SECURITY_STYLE_AUTHENTICATED |
| }; |
| +// A human-readable summary phrase and more detailed description of a |
| +// security property that was used to compute the SecurityStyle of a |
| +// resource. An example summary phrase would be "Expired Certificate", |
| +// with a description along the lines of "This site's certificate chain |
| +// contains errors (NET::CERT_DATE_INVALID)". |
|
Peter Kasting
2015/06/16 06:29:11
Nit: "net::"?
estark
2015/06/16 15:32:35
Done.
|
| +struct SecurityStyleProperty { |
|
Peter Kasting
2015/06/16 06:29:11
Nit: I might name this "SecurityStyleExplanation"
estark
2015/06/16 15:32:35
Done. I went with SecurityStyleExplanation instead
|
| + SecurityStyleProperty(); |
| + SecurityStyleProperty(const std::string& summary_input, |
| + const std::string& description_input); |
| + ~SecurityStyleProperty(); |
| + |
| + std::string summary; |
| + std::string description; |
| +}; |
| + |
| +// A |SecurityStyleExplanation| contains human-readable explanations for |
| +// why a particular |SecurityStyle| was chosen. Each |
| +// |SecurityStyleProperty| is a single security property of a page (for |
| +// example, an expired certificate or the presence of active mixed |
| +// content). An explanation can have multiple |warning_explanations| and |
| +// multiple |broken_explanations|, and both can be non-empty if a site |
| +// has multiple issues. |
| +struct SecurityStyleExplanation { |
| + SecurityStyleExplanation(); |
| + ~SecurityStyleExplanation(); |
| + |
| + std::vector<SecurityStyleProperty> warning_explanations; |
| + std::vector<SecurityStyleProperty> broken_explanations; |
| +}; |
| + |
| } // namespace content |
| #endif // CONTENT_PUBLIC_COMMON_SECURITY_STYLE_H_ |