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.
5 #ifndef CHROME_BROWSER_SSL_CONNECTION_SECURITY_HELPER_H_
6 #define CHROME_BROWSER_SSL_CONNECTION_SECURITY_HELPER_H_
8 #include "base/macros.h"
12 } // namespace content
14 // This class is responsible for computing the security level of a page.
15 class ConnectionSecurityHelper
{
17 // TODO(wtc): unify this enum with SecurityStyle. We
18 // don't need two sets of security UI levels. SECURITY_STYLE_AUTHENTICATED
19 // needs to be refined into three levels: warning, standard, and EV.
20 // See crbug.com/425728
22 // If you reorder, add, or delete values from this enum, you must also
23 // update the UI icons in ToolbarModelImpl::GetIconForSecurityLevel.
25 // A Java counterpart will be generated for this enum.
26 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ssl
27 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ConnectionSecurityHelperSecurityLevel
32 // HTTPS with valid EV cert
38 // HTTPS, but unable to check certificate revocation status or with insecure
39 // content on the page
42 // HTTPS, but the certificate verification chain is anchored on a
43 // certificate that was installed by the system administrator
44 SECURITY_POLICY_WARNING
,
46 // Attempted HTTPS and failed, page not authenticated
50 // Returns a security level describing the overall security state of
51 // the given |WebContents|.
52 static SecurityLevel
GetSecurityLevelForWebContents(
53 const content::WebContents
* web_contents
);
56 DISALLOW_IMPLICIT_CONSTRUCTORS(ConnectionSecurityHelper
);
59 #endif // CHROME_BROWSER_SSL_CONNECTION_SECURITY_HELPER_H_