| 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 "net/cert/cert_status_flags.h" | 11 #include "net/cert/cert_status_flags.h" |
| 11 | 12 |
| 12 namespace content { | 13 namespace content { |
| 13 | 14 |
| 14 // Collects the SSL information for this NavigationEntry. | 15 // Collects the SSL information for this NavigationEntry. |
| 15 struct CONTENT_EXPORT SSLStatus { | 16 struct CONTENT_EXPORT SSLStatus { |
| 16 // Flags used for the page security content status. | 17 // Flags used for the page security content status. |
| 17 enum ContentStatusFlags { | 18 enum ContentStatusFlags { |
| 18 // HTTP page, or HTTPS page with no insecure content. | 19 // HTTP page, or HTTPS page with no insecure content. |
| 19 NORMAL_CONTENT = 0, | 20 NORMAL_CONTENT = 0, |
| 20 | 21 |
| 21 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS). | 22 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS). |
| 22 DISPLAYED_INSECURE_CONTENT = 1 << 0, | 23 DISPLAYED_INSECURE_CONTENT = 1 << 0, |
| 23 | 24 |
| 24 // HTTPS page containing "executed" HTTP resources (i.e. script). | 25 // HTTPS page containing "executed" HTTP resources (i.e. script). |
| 25 // Also currently used for HTTPS page containing broken-HTTPS resources; | 26 // Also currently used for HTTPS page containing broken-HTTPS resources; |
| 26 // this is wrong and should be fixed (see comments in | 27 // this is wrong and should be fixed (see comments in |
| 27 // SSLPolicy::OnRequestStarted()). | 28 // SSLPolicy::OnRequestStarted()). |
| 28 RAN_INSECURE_CONTENT = 1 << 1, | 29 RAN_INSECURE_CONTENT = 1 << 1, |
| 29 }; | 30 }; |
| 30 | 31 |
| 31 SSLStatus(); | 32 SSLStatus(); |
| 32 | 33 |
| 33 bool Equals(const SSLStatus& status) const { | 34 bool Equals(const SSLStatus& status) const { |
| 34 return security_style == status.security_style && | 35 return security_style == status.security_style && |
| 35 cert_id == status.cert_id && | 36 cert_id == status.cert_id && |
| 36 cert_status == status.cert_status && | 37 cert_status == status.cert_status && |
| 37 security_bits == status.security_bits && | 38 security_bits == status.security_bits && |
| 38 content_status == status.content_status; | 39 content_status == status.content_status && |
| 40 signed_certificate_timestamp_ids == |
| 41 status.signed_certificate_timestamp_ids; |
| 39 } | 42 } |
| 40 | 43 |
| 41 content::SecurityStyle security_style; | 44 content::SecurityStyle security_style; |
| 42 int cert_id; | 45 int cert_id; |
| 43 net::CertStatus cert_status; | 46 net::CertStatus cert_status; |
| 44 int security_bits; | 47 int security_bits; |
| 45 int connection_status; | 48 int connection_status; |
| 46 // A combination of the ContentStatusFlags above. | 49 // A combination of the ContentStatusFlags above. |
| 47 int content_status; | 50 int content_status; |
| 51 SignedCertificateTimestampIDStatusList signed_certificate_timestamp_ids; |
| 48 }; | 52 }; |
| 49 | 53 |
| 50 } // namespace content | 54 } // namespace content |
| 51 | 55 |
| 52 #endif // CONTENT_PUBLIC_COMMON_SSL_STATUS_H_ | 56 #endif // CONTENT_PUBLIC_COMMON_SSL_STATUS_H_ |
| OLD | NEW |