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