OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_SSL_SECURITY_LEVEL_POLICY_H_ | |
6 #define CHROME_BROWSER_SSL_SECURITY_LEVEL_POLICY_H_ | |
7 | |
8 namespace content { | |
9 class WebContents; | |
10 } // namespace content | |
11 | |
12 // This class is responsible for computing the security level of a page. | |
13 class SecurityLevelPolicy { | |
felt
2015/05/07 20:10:18
While this is being moved anyway:
What do you thi
Peter Kasting
2015/05/07 21:35:37
Another possibility would be to eliminate the wrap
estark
2015/05/08 04:54:32
I think I'd like to leave it as a class, if that's
Peter Kasting
2015/05/08 06:38:00
Leaving as a class is OK given your plans. I woul
estark
2015/05/08 14:16:00
I was thinking of "SHA1 signature in chain => page
estark
2015/05/09 02:29:08
Renamed to ConnectionSecurityHelper.
| |
14 public: | |
15 // TODO(wtc): unify ToolbarModel::SecurityLevel with SecurityStyle. We | |
Peter Kasting
2015/05/07 21:35:37
This CL would probably be a good time to either im
| |
16 // don't need two sets of security UI levels. SECURITY_STYLE_AUTHENTICATED | |
17 // needs to be refined into three levels: warning, standard, and EV. | |
18 // | |
19 // A Java counterpart will be generated for this enum. | |
20 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ssl | |
21 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: SecurityLevelPolicySecurityLevel | |
22 enum SecurityLevel { | |
23 // HTTP/no URL/user is editing | |
24 NONE = 0, | |
25 | |
26 // HTTPS with valid EV cert | |
27 EV_SECURE = 1, | |
28 | |
29 // HTTPS (non-EV) | |
30 SECURE = 2, | |
31 | |
32 // HTTPS, but unable to check certificate revocation status or with insecure | |
33 // content on the page | |
34 SECURITY_WARNING = 3, | |
35 | |
36 // HTTPS, but the certificate verification chain is anchored on a | |
37 // certificate that was installed by the system administrator | |
38 SECURITY_POLICY_WARNING = 4, | |
39 | |
40 // Attempted HTTPS and failed, page not authenticated | |
41 SECURITY_ERROR = 5, | |
42 | |
43 NUM_SECURITY_LEVELS = 6, | |
44 }; | |
45 | |
46 static SecurityLevel GetSecurityLevelForWebContents( | |
47 content::WebContents* web_contents); | |
48 | |
49 private: | |
50 SecurityLevelPolicy(); | |
Peter Kasting
2015/05/07 21:35:37
Use DISALLOW_IMPLICIT_CONSTRUCTORS here.
estark
2015/05/09 02:29:08
Done.
| |
51 ~SecurityLevelPolicy(); | |
52 }; | |
53 | |
54 #endif // CHROME_BROWSER_SSL_SECURITY_LEVEL_POLICY_H_ | |
OLD | NEW |