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..d492b007fa9b5091ba91747be5881637ebbf6089 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,35 @@ 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)". |
| +struct SecurityStyleExplanation { |
|
Charlie Reis
2015/06/17 18:37:40
From the content API guidelines:
"each interface/s
estark
2015/06/17 20:35:58
Done.
|
| + SecurityStyleExplanation(); |
| + SecurityStyleExplanation(const std::string& summary, |
| + const std::string& description); |
| + ~SecurityStyleExplanation(); |
| + |
| + std::string summary; |
| + std::string description; |
| +}; |
| + |
| +// SecurityStyleExplanations contains human-readable explanations for |
| +// why a particular SecurityStyle was chosen. Each |
| +// SecurityStyleExplanation is a single security property of a page (for |
| +// example, an expired certificate or the presence of active mixed |
| +// content). A single site may have multiple different explanations of |
| +// "warning" and "broken" severity levels. |
| +struct SecurityStyleExplanations { |
| + SecurityStyleExplanations(); |
| + ~SecurityStyleExplanations(); |
| + |
| + std::vector<SecurityStyleExplanation> warning_explanations; |
| + std::vector<SecurityStyleExplanation> broken_explanations; |
| +}; |
| + |
| } // namespace content |
| #endif // CONTENT_PUBLIC_COMMON_SECURITY_STYLE_H_ |