Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1918)

Unified Diff: content/public/common/security_style.h

Issue 1181293003: Expand SecurityStyleChanged interfaces to include explanations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pkasting comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/web_contents_observer.h ('k') | content/public/common/security_style.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..dbe1ee79702ba1908eed0efed94dee98db488889 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)".
+struct SecurityStyleExplanation {
+ SecurityStyleExplanation();
+ SecurityStyleExplanation(const std::string& summary_input,
+ const std::string& description_input);
Peter Kasting 2015/06/16 22:11:31 Nit: Name these |summary| and |description|. You
estark 2015/06/16 23:42:20 Done.
+ ~SecurityStyleExplanation();
+
+ std::string summary;
+ std::string description;
+};
+
+// A SecurityStyleExplanations contains human-readable explanations for
Peter Kasting 2015/06/16 22:11:31 Nit: Remove initial "A" (it just makes the sentenc
estark 2015/06/16 23:42:20 Done.
+// 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). An explanation can have multiple |warning_explanations| and
+// multiple |broken_explanations|, and both can be non-empty if a site
+// has multiple issues.
Peter Kasting 2015/06/16 22:11:31 Nit: This last sentence is now unclear because "An
estark 2015/06/16 23:42:20 Done.
+struct SecurityStyleExplanations {
+ SecurityStyleExplanations();
+ ~SecurityStyleExplanations();
+
+ std::vector<SecurityStyleExplanation> warning_explanations;
+ std::vector<SecurityStyleExplanation> broken_explanations;
+};
+
} // namespace content
#endif // CONTENT_PUBLIC_COMMON_SECURITY_STYLE_H_
« no previous file with comments | « content/public/browser/web_contents_observer.h ('k') | content/public/common/security_style.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698