| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_COMMON_SSL_STATUS_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_SSL_STATUS_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_SSL_STATUS_H_ | 6 #define CONTENT_PUBLIC_COMMON_SSL_STATUS_H_ |
| 7 | 7 |
| 8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
| 9 #include "content/public/common/security_style.h" | 9 #include "content/public/common/security_style.h" |
| 10 #include "content/public/common/signed_certificate_timestamp_id_and_status.h" | 10 #include "content/public/common/signed_certificate_timestamp_id_and_status.h" |
| 11 #include "net/cert/cert_status_flags.h" | 11 #include "net/cert/cert_status_flags.h" |
| 12 | 12 |
| 13 namespace net { |
| 14 class SSLInfo; |
| 15 } |
| 16 |
| 13 namespace content { | 17 namespace content { |
| 14 | 18 |
| 15 // Collects the SSL information for this NavigationEntry. | 19 // Collects the SSL information for this NavigationEntry. |
| 16 struct CONTENT_EXPORT SSLStatus { | 20 struct CONTENT_EXPORT SSLStatus { |
| 17 // Flags used for the page security content status. | 21 // Flags used for the page security content status. |
| 18 enum ContentStatusFlags { | 22 enum ContentStatusFlags { |
| 19 // HTTP page, or HTTPS page with no insecure content. | 23 // HTTP page, or HTTPS page with no insecure content. |
| 20 NORMAL_CONTENT = 0, | 24 NORMAL_CONTENT = 0, |
| 21 | 25 |
| 22 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS). | 26 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS). |
| 23 DISPLAYED_INSECURE_CONTENT = 1 << 0, | 27 DISPLAYED_INSECURE_CONTENT = 1 << 0, |
| 24 | 28 |
| 25 // HTTPS page containing "executed" HTTP resources (i.e. script). | 29 // HTTPS page containing "executed" HTTP resources (i.e. script). |
| 26 // Also currently used for HTTPS page containing broken-HTTPS resources; | 30 // Also currently used for HTTPS page containing broken-HTTPS resources; |
| 27 // this is wrong and should be fixed (see comments in | 31 // this is wrong and should be fixed (see comments in |
| 28 // SSLPolicy::OnRequestStarted()). | 32 // SSLPolicy::OnRequestStarted()). |
| 29 RAN_INSECURE_CONTENT = 1 << 1, | 33 RAN_INSECURE_CONTENT = 1 << 1, |
| 30 }; | 34 }; |
| 31 | 35 |
| 32 SSLStatus(); | 36 SSLStatus(); |
| 37 SSLStatus(SecurityStyle security_style, |
| 38 int cert_id, |
| 39 const SignedCertificateTimestampIDStatusList& |
| 40 signed_certificate_timestamp_ids, |
| 41 const net::SSLInfo& ssl_info); |
| 33 ~SSLStatus(); | 42 ~SSLStatus(); |
| 34 | 43 |
| 35 bool Equals(const SSLStatus& status) const { | 44 bool Equals(const SSLStatus& status) const { |
| 36 return security_style == status.security_style && | 45 return security_style == status.security_style && |
| 37 cert_id == status.cert_id && | 46 cert_id == status.cert_id && cert_status == status.cert_status && |
| 38 cert_status == status.cert_status && | |
| 39 security_bits == status.security_bits && | 47 security_bits == status.security_bits && |
| 48 connection_status == status.connection_status && |
| 40 content_status == status.content_status && | 49 content_status == status.content_status && |
| 41 signed_certificate_timestamp_ids == | 50 signed_certificate_timestamp_ids == |
| 42 status.signed_certificate_timestamp_ids; | 51 status.signed_certificate_timestamp_ids; |
| 43 } | 52 } |
| 44 | 53 |
| 45 content::SecurityStyle security_style; | 54 content::SecurityStyle security_style; |
| 46 // A cert_id value of 0 indicates that it is unset or invalid. | 55 // A cert_id value of 0 indicates that it is unset or invalid. |
| 47 int cert_id; | 56 int cert_id; |
| 48 net::CertStatus cert_status; | 57 net::CertStatus cert_status; |
| 49 int security_bits; | 58 int security_bits; |
| 50 int connection_status; | 59 int connection_status; |
| 51 // A combination of the ContentStatusFlags above. | 60 // A combination of the ContentStatusFlags above. |
| 52 int content_status; | 61 int content_status; |
| 53 SignedCertificateTimestampIDStatusList signed_certificate_timestamp_ids; | 62 SignedCertificateTimestampIDStatusList signed_certificate_timestamp_ids; |
| 54 }; | 63 }; |
| 55 | 64 |
| 56 } // namespace content | 65 } // namespace content |
| 57 | 66 |
| 58 #endif // CONTENT_PUBLIC_COMMON_SSL_STATUS_H_ | 67 #endif // CONTENT_PUBLIC_COMMON_SSL_STATUS_H_ |
| OLD | NEW |