| 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> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 #include "content/public/common/security_style.h" | 11 #include "content/public/common/security_style.h" |
| 12 #include "net/cert/cert_status_flags.h" | 12 #include "net/cert/cert_status_flags.h" |
| 13 #include "net/cert/sct_status_flags.h" | 13 #include "net/cert/sct_status_flags.h" |
| 14 | 14 |
| 15 namespace net { | 15 namespace net { |
| 16 class SSLInfo; | 16 class SSLInfo; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 | 20 |
| 21 // Collects the SSL information for this NavigationEntry. | 21 // Collects the SSL information for this NavigationEntry. |
| 22 struct CONTENT_EXPORT SSLStatus { | 22 struct CONTENT_EXPORT SSLStatus { |
| 23 // Flags used for the page security content status. | 23 // Flags used for the page security content status. |
| 24 enum ContentStatusFlags { | 24 enum ContentStatusFlags { |
| 25 // HTTP page, or HTTPS page with no insecure content. | 25 // HTTP page, or HTTPS page with no insecure content. |
| 26 NORMAL_CONTENT = 0, | 26 NORMAL_CONTENT = 0, |
| 27 | 27 |
| 28 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS). | 28 // HTTPS page containing "displayed" HTTP subresources (e.g. images, CSS). |
| 29 DISPLAYED_INSECURE_CONTENT = 1 << 0, | 29 DISPLAYED_INSECURE_CONTENT = 1 << 0, |
| 30 | 30 |
| 31 // HTTPS page containing "executed" HTTP resources (i.e. script). | 31 // HTTPS page containing "executed" HTTP subresources (i.e. script). |
| 32 // Also currently used for HTTPS page containing broken-HTTPS resources; | 32 RAN_INSECURE_CONTENT = 1 << 1, |
| 33 // this is wrong and should be fixed (see comments in | 33 |
| 34 // SSLPolicy::OnRequestStarted()). | 34 // HTTPS page containing "displayed" HTTPS subresources (e.g. images, |
| 35 RAN_INSECURE_CONTENT = 1 << 1, | 35 // CSS) loaded with certificate errors. |
| 36 DISPLAYED_CONTENT_WITH_CERTIFICATE_ERRORS = 1 << 2, |
| 37 |
| 38 // HTTPS page containing "executed" HTTPS subresources (e.g. script) |
| 39 // loaded with certificate errors. |
| 40 RAN_CONTENT_WITH_CERTIFICATE_ERRORS = 1 << 3, |
| 36 }; | 41 }; |
| 37 | 42 |
| 38 SSLStatus(); | 43 SSLStatus(); |
| 39 SSLStatus(SecurityStyle security_style, | 44 SSLStatus(SecurityStyle security_style, |
| 40 int cert_id, | 45 int cert_id, |
| 41 const net::SSLInfo& ssl_info); | 46 const net::SSLInfo& ssl_info); |
| 42 SSLStatus(const SSLStatus& other); | 47 SSLStatus(const SSLStatus& other); |
| 43 ~SSLStatus(); | 48 ~SSLStatus(); |
| 44 | 49 |
| 45 bool Equals(const SSLStatus& status) const { | 50 bool Equals(const SSLStatus& status) const { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 66 // of Certificate Transparency (CT) that were served with the | 71 // of Certificate Transparency (CT) that were served with the |
| 67 // main resource. | 72 // main resource. |
| 68 std::vector<net::ct::SCTVerifyStatus> sct_statuses; | 73 std::vector<net::ct::SCTVerifyStatus> sct_statuses; |
| 69 // True if PKP was bypassed due to a local trust anchor. | 74 // True if PKP was bypassed due to a local trust anchor. |
| 70 bool pkp_bypassed; | 75 bool pkp_bypassed; |
| 71 }; | 76 }; |
| 72 | 77 |
| 73 } // namespace content | 78 } // namespace content |
| 74 | 79 |
| 75 #endif // CONTENT_PUBLIC_COMMON_SSL_STATUS_H_ | 80 #endif // CONTENT_PUBLIC_COMMON_SSL_STATUS_H_ |
| OLD | NEW |