Chromium Code Reviews| 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 // Holds the ID of a SignedCertificateTimestamp (as assigned by | |
| 18 // SignedCertificateTimestampStore), and its verification status. | |
|
jam
2013/11/27 01:07:50
per content api guidelines (http://www.chromium.or
alcutter
2013/11/27 12:17:56
Done, thank you for pointing that out.
| |
| 19 struct SignedCertificateTimestampIDAndStatus { | |
| 20 SignedCertificateTimestampIDAndStatus( | |
| 21 int id, net::SignedCertificateTimestampVerificationStatus status); | |
| 22 | |
| 23 bool operator==(const SignedCertificateTimestampIDAndStatus& other) const; | |
| 24 | |
| 25 int id_; | |
| 26 net::SignedCertificateTimestampVerificationStatus status_; | |
|
jam
2013/11/27 01:07:50
nit: per style guide, no "_" at end of member vari
alcutter
2013/11/27 12:17:56
Done.
| |
| 27 }; | |
| 28 | |
| 29 typedef std::vector<SignedCertificateTimestampIDAndStatus> | |
| 30 SignedCertificateTimestampIDStatusList; | |
| 31 | |
| 14 // Collects the SSL information for this NavigationEntry. | 32 // Collects the SSL information for this NavigationEntry. |
| 15 struct CONTENT_EXPORT SSLStatus { | 33 struct CONTENT_EXPORT SSLStatus { |
| 16 // Flags used for the page security content status. | 34 // Flags used for the page security content status. |
| 17 enum ContentStatusFlags { | 35 enum ContentStatusFlags { |
| 18 // HTTP page, or HTTPS page with no insecure content. | 36 // HTTP page, or HTTPS page with no insecure content. |
| 19 NORMAL_CONTENT = 0, | 37 NORMAL_CONTENT = 0, |
| 20 | 38 |
| 21 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS). | 39 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS). |
| 22 DISPLAYED_INSECURE_CONTENT = 1 << 0, | 40 DISPLAYED_INSECURE_CONTENT = 1 << 0, |
| 23 | 41 |
| 24 // HTTPS page containing "executed" HTTP resources (i.e. script). | 42 // HTTPS page containing "executed" HTTP resources (i.e. script). |
| 25 // Also currently used for HTTPS page containing broken-HTTPS resources; | 43 // Also currently used for HTTPS page containing broken-HTTPS resources; |
| 26 // this is wrong and should be fixed (see comments in | 44 // this is wrong and should be fixed (see comments in |
| 27 // SSLPolicy::OnRequestStarted()). | 45 // SSLPolicy::OnRequestStarted()). |
| 28 RAN_INSECURE_CONTENT = 1 << 1, | 46 RAN_INSECURE_CONTENT = 1 << 1, |
| 29 }; | 47 }; |
| 30 | 48 |
| 31 SSLStatus(); | 49 SSLStatus(); |
| 50 ~SSLStatus(); | |
|
jam
2013/11/27 01:07:50
nit: don't add that unless it's necessary. I see t
alcutter
2013/11/27 12:17:56
I think this might've been a thinko.
Removed.
alcutter
2013/11/28 18:44:11
Ah, not having this there causes android_clang_dbg
| |
| 32 | 51 |
| 33 bool Equals(const SSLStatus& status) const { | 52 bool Equals(const SSLStatus& status) const { |
| 34 return security_style == status.security_style && | 53 return security_style == status.security_style && |
| 35 cert_id == status.cert_id && | 54 cert_id == status.cert_id && |
| 36 cert_status == status.cert_status && | 55 cert_status == status.cert_status && |
| 37 security_bits == status.security_bits && | 56 security_bits == status.security_bits && |
| 38 content_status == status.content_status; | 57 content_status == status.content_status && |
| 58 signed_certificate_timestamp_ids == | |
| 59 status.signed_certificate_timestamp_ids; | |
| 39 } | 60 } |
| 40 | 61 |
| 41 content::SecurityStyle security_style; | 62 content::SecurityStyle security_style; |
| 42 int cert_id; | 63 int cert_id; |
| 43 net::CertStatus cert_status; | 64 net::CertStatus cert_status; |
| 44 int security_bits; | 65 int security_bits; |
| 45 int connection_status; | 66 int connection_status; |
| 46 // A combination of the ContentStatusFlags above. | 67 // A combination of the ContentStatusFlags above. |
| 47 int content_status; | 68 int content_status; |
| 69 SignedCertificateTimestampIDStatusList signed_certificate_timestamp_ids; | |
| 48 }; | 70 }; |
| 49 | 71 |
| 50 } // namespace content | 72 } // namespace content |
| 51 | 73 |
| 52 #endif // CONTENT_PUBLIC_COMMON_SSL_STATUS_H_ | 74 #endif // CONTENT_PUBLIC_COMMON_SSL_STATUS_H_ |
| OLD | NEW |