Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 { | |
|
Charlie Reis
2015/06/17 18:37:40
From the content API guidelines:
"each interface/s
estark
2015/06/17 20:35:58
Done.
| |
| 51 SecurityStyleExplanation(); | |
| 52 SecurityStyleExplanation(const std::string& summary, | |
| 53 const std::string& description); | |
| 54 ~SecurityStyleExplanation(); | |
| 55 | |
| 56 std::string summary; | |
| 57 std::string description; | |
| 58 }; | |
| 59 | |
| 60 // SecurityStyleExplanations contains human-readable explanations for | |
| 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). A single site may have multiple different explanations of | |
| 65 // "warning" and "broken" severity levels. | |
| 66 struct SecurityStyleExplanations { | |
| 67 SecurityStyleExplanations(); | |
| 68 ~SecurityStyleExplanations(); | |
| 69 | |
| 70 std::vector<SecurityStyleExplanation> warning_explanations; | |
| 71 std::vector<SecurityStyleExplanation> broken_explanations; | |
| 72 }; | |
| 73 | |
| 42 } // namespace content | 74 } // namespace content |
| 43 | 75 |
| 44 #endif // CONTENT_PUBLIC_COMMON_SECURITY_STYLE_H_ | 76 #endif // CONTENT_PUBLIC_COMMON_SECURITY_STYLE_H_ |
| OLD | NEW |