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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_COMMON_SECURITY_STYLE_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_SECURITY_STYLE_H_
6 #define CONTENT_PUBLIC_COMMON_SECURITY_STYLE_H_ 6 #define CONTENT_PUBLIC_COMMON_SECURITY_STYLE_H_
7 7
8 #include <string>
9 #include <vector>
10
8 namespace content { 11 namespace content {
9 12
10 // Various aspects of the UI change their appearance according to the security 13 // Various aspects of the UI change their appearance according to the security
11 // context in which they are displayed. For example, the location bar displays 14 // context in which they are displayed. For example, the location bar displays
12 // a lock icon when it is displayed during a valid SSL connection. 15 // a lock icon when it is displayed during a valid SSL connection.
13 // SecuritySyle enumerates these styles, but it is up to the UI elements to 16 // SecuritySyle enumerates these styles, but it is up to the UI elements to
14 // adjust their display appropriately. 17 // adjust their display appropriately.
15 enum SecurityStyle { 18 enum SecurityStyle {
16 // SECURITY_STYLE_UNKNOWN indicates that we do not know the proper security 19 // SECURITY_STYLE_UNKNOWN indicates that we do not know the proper security
17 // style for this object. 20 // style for this object.
(...skipping 14 matching lines...) Expand all
32 // authenticated manner, but there were security issues with the retrieval or 35 // authenticated manner, but there were security issues with the retrieval or
33 // the object interacted with less secure objects. 36 // the object interacted with less secure objects.
34 SECURITY_STYLE_WARNING, 37 SECURITY_STYLE_WARNING,
35 38
36 // SECURITY_STYLE_AUTHENTICATED indicates that we successfully retrieved this 39 // SECURITY_STYLE_AUTHENTICATED indicates that we successfully retrieved this
37 // object over an authenticated protocol, such as HTTPS. 40 // object over an authenticated protocol, such as HTTPS.
38 SECURITY_STYLE_AUTHENTICATED, 41 SECURITY_STYLE_AUTHENTICATED,
39 SECURITY_STYLE_LAST = SECURITY_STYLE_AUTHENTICATED 42 SECURITY_STYLE_LAST = SECURITY_STYLE_AUTHENTICATED
40 }; 43 };
41 44
45 // A human-readable summary phrase and more detailed description of a
46 // security property that was used to compute the SecurityStyle of a
47 // resource. An example summary phrase would be "Expired Certificate",
48 // with a description along the lines of "This site's certificate chain
49 // contains errors (net::CERT_DATE_INVALID)".
50 struct SecurityStyleExplanation {
51 SecurityStyleExplanation();
52 SecurityStyleExplanation(const std::string& summary_input,
53 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.
54 ~SecurityStyleExplanation();
55
56 std::string summary;
57 std::string description;
58 };
59
60 // 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.
61 // why a particular SecurityStyle was chosen. Each
62 // SecurityStyleExplanation is a single security property of a page (for
63 // example, an expired certificate or the presence of active mixed
64 // content). An explanation can have multiple |warning_explanations| and
65 // multiple |broken_explanations|, and both can be non-empty if a site
66 // 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.
67 struct SecurityStyleExplanations {
68 SecurityStyleExplanations();
69 ~SecurityStyleExplanations();
70
71 std::vector<SecurityStyleExplanation> warning_explanations;
72 std::vector<SecurityStyleExplanation> broken_explanations;
73 };
74
42 } // namespace content 75 } // namespace content
43 76
44 #endif // CONTENT_PUBLIC_COMMON_SECURITY_STYLE_H_ 77 #endif // CONTENT_PUBLIC_COMMON_SECURITY_STYLE_H_
OLDNEW
« 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