| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_SSL_SECURITY_STATE_MODEL_H_ | 5 #ifndef COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ |
| 6 #define CHROME_BROWSER_SSL_SECURITY_STATE_MODEL_H_ | 6 #define COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "net/cert/cert_status_flags.h" | 9 #include "net/cert/cert_status_flags.h" |
| 10 #include "net/cert/sct_status_flags.h" | 10 #include "net/cert/sct_status_flags.h" |
| 11 #include "net/cert/x509_certificate.h" | 11 #include "net/cert/x509_certificate.h" |
| 12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
| 13 | 13 |
| 14 class Profile; | 14 namespace security_state { |
| 15 |
| 15 class SecurityStateModelClient; | 16 class SecurityStateModelClient; |
| 16 | 17 |
| 17 // SecurityStateModel provides high-level security information about a | 18 // SecurityStateModel provides high-level security information about a |
| 18 // page or request. | 19 // page or request. |
| 19 // | 20 // |
| 20 // SecurityStateModel::SecurityInfo is the main data structure computed | 21 // SecurityStateModel::SecurityInfo is the main data structure computed |
| 21 // by a SecurityStateModel. SecurityInfo contains a SecurityLevel (which | 22 // by a SecurityStateModel. SecurityInfo contains a SecurityLevel (which |
| 22 // is a single value describing the overall security state) along with | 23 // is a single value describing the overall security state) along with |
| 23 // information that a consumer might want to display in UI to explain or | 24 // information that a consumer might want to display in UI to explain or |
| 24 // elaborate on the SecurityLevel. | 25 // elaborate on the SecurityLevel. |
| 25 class SecurityStateModel { | 26 class SecurityStateModel { |
| 26 public: | 27 public: |
| 27 // Describes the overall security state of the page. | 28 // Describes the overall security state of the page. |
| 28 // | 29 // |
| 29 // If you reorder, add, or delete values from this enum, you must also | 30 // If you reorder, add, or delete values from this enum, you must also |
| 30 // update the UI icons in ToolbarModelImpl::GetIconForSecurityLevel. | 31 // update the UI icons in ToolbarModelImpl::GetIconForSecurityLevel. |
| 31 // | 32 // |
| 32 // A Java counterpart will be generated for this enum. | 33 // A Java counterpart will be generated for this enum. |
| 33 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ssl | 34 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.security_state |
| 34 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ConnectionSecurityLevel | 35 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ConnectionSecurityLevel |
| 35 enum SecurityLevel { | 36 enum SecurityLevel { |
| 36 // HTTP/no URL/HTTPS but with insecure passive content on the page | 37 // HTTP/no URL/HTTPS but with insecure passive content on the page |
| 37 NONE, | 38 NONE, |
| 38 | 39 |
| 39 // HTTPS with valid EV cert | 40 // HTTPS with valid EV cert |
| 40 EV_SECURE, | 41 EV_SECURE, |
| 41 | 42 |
| 42 // HTTPS (non-EV) with valid cert | 43 // HTTPS (non-EV) with valid cert |
| 43 SECURE, | 44 SECURE, |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 // mutable so that the const accessor GetSecurityInfo() can update the | 157 // mutable so that the const accessor GetSecurityInfo() can update the |
| 157 // cached values. | 158 // cached values. |
| 158 mutable SecurityInfo security_info_; | 159 mutable SecurityInfo security_info_; |
| 159 mutable VisibleSecurityState visible_security_state_; | 160 mutable VisibleSecurityState visible_security_state_; |
| 160 | 161 |
| 161 SecurityStateModelClient* client_; | 162 SecurityStateModelClient* client_; |
| 162 | 163 |
| 163 DISALLOW_COPY_AND_ASSIGN(SecurityStateModel); | 164 DISALLOW_COPY_AND_ASSIGN(SecurityStateModel); |
| 164 }; | 165 }; |
| 165 | 166 |
| 166 #endif // CHROME_BROWSER_SSL_SECURITY_STATE_MODEL_H_ | 167 } // namespace security_state |
| 168 |
| 169 #endif // COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ |
| OLD | NEW |