Chromium Code Reviews| 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. |
| 26 // | |
| 27 // A Java counterpart will be generated for this enum. | |
|
blundell
2016/01/07 08:39:30
nit: the comments added at lines 26-29 seem unnece
estark
2016/01/07 19:18:25
Oops, just a copy/paste error. Removed.
| |
| 28 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.security_state | |
| 29 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ConnectionSecurityLevel | |
| 25 class SecurityStateModel { | 30 class SecurityStateModel { |
| 26 public: | 31 public: |
| 27 // Describes the overall security state of the page. | 32 // Describes the overall security state of the page. |
| 28 // | 33 // |
| 29 // If you reorder, add, or delete values from this enum, you must also | 34 // If you reorder, add, or delete values from this enum, you must also |
| 30 // update the UI icons in ToolbarModelImpl::GetIconForSecurityLevel. | 35 // update the UI icons in ToolbarModelImpl::GetIconForSecurityLevel. |
| 31 // | 36 // |
| 32 // A Java counterpart will be generated for this enum. | 37 // A Java counterpart will be generated for this enum. |
| 33 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ssl | 38 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.security_state |
| 34 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ConnectionSecurityLevel | 39 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ConnectionSecurityLevel |
| 35 enum SecurityLevel { | 40 enum SecurityLevel { |
| 36 // HTTP/no URL/HTTPS but with insecure passive content on the page | 41 // HTTP/no URL/HTTPS but with insecure passive content on the page |
| 37 NONE, | 42 NONE, |
| 38 | 43 |
| 39 // HTTPS with valid EV cert | 44 // HTTPS with valid EV cert |
| 40 EV_SECURE, | 45 EV_SECURE, |
| 41 | 46 |
| 42 // HTTPS (non-EV) with valid cert | 47 // HTTPS (non-EV) with valid cert |
| 43 SECURE, | 48 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 | 161 // mutable so that the const accessor GetSecurityInfo() can update the |
| 157 // cached values. | 162 // cached values. |
| 158 mutable SecurityInfo security_info_; | 163 mutable SecurityInfo security_info_; |
| 159 mutable VisibleSecurityState visible_security_state_; | 164 mutable VisibleSecurityState visible_security_state_; |
| 160 | 165 |
| 161 SecurityStateModelClient* client_; | 166 SecurityStateModelClient* client_; |
| 162 | 167 |
| 163 DISALLOW_COPY_AND_ASSIGN(SecurityStateModel); | 168 DISALLOW_COPY_AND_ASSIGN(SecurityStateModel); |
| 164 }; | 169 }; |
| 165 | 170 |
| 166 #endif // CHROME_BROWSER_SSL_SECURITY_STATE_MODEL_H_ | 171 } // namespace security_state |
| 172 | |
| 173 #endif // COMPONENTS_SECURITY_STATE_SECURITY_STATE_MODEL_H_ | |
| OLD | NEW |