Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / chrome / browser / ssl / connection_security_helper.h
blob3a34b567b977705b2b60567125bca354fa46b8d3
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"
10 namespace content {
11 class WebContents;
12 } // namespace content
14 // This class is responsible for computing the security level of a page.
15 class ConnectionSecurityHelper {
16 public:
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
28 enum SecurityLevel {
29 // HTTP/no URL
30 NONE,
32 // HTTPS with valid EV cert
33 EV_SECURE,
35 // HTTPS (non-EV)
36 SECURE,
38 // HTTPS, but unable to check certificate revocation status or with insecure
39 // content on the page
40 SECURITY_WARNING,
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
47 SECURITY_ERROR,
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);
55 private:
56 DISALLOW_IMPLICIT_CONSTRUCTORS(ConnectionSecurityHelper);
59 #endif // CHROME_BROWSER_SSL_CONNECTION_SECURITY_HELPER_H_