Roll src/third_party/WebKit eac3800:0237a66 (svn 202606:202607)
[chromium-blink-merge.git] / content / public / common / ssl_status.h
blobbb3501c0a250731b211a307c2dd500967c580194
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_COMMON_SSL_STATUS_H_
6 #define CONTENT_PUBLIC_COMMON_SSL_STATUS_H_
8 #include "content/common/content_export.h"
9 #include "content/public/common/security_style.h"
10 #include "content/public/common/signed_certificate_timestamp_id_and_status.h"
11 #include "net/cert/cert_status_flags.h"
13 namespace net {
14 class SSLInfo;
17 namespace content {
19 // Collects the SSL information for this NavigationEntry.
20 struct CONTENT_EXPORT SSLStatus {
21 // Flags used for the page security content status.
22 enum ContentStatusFlags {
23 // HTTP page, or HTTPS page with no insecure content.
24 NORMAL_CONTENT = 0,
26 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS).
27 DISPLAYED_INSECURE_CONTENT = 1 << 0,
29 // HTTPS page containing "executed" HTTP resources (i.e. script).
30 // Also currently used for HTTPS page containing broken-HTTPS resources;
31 // this is wrong and should be fixed (see comments in
32 // SSLPolicy::OnRequestStarted()).
33 RAN_INSECURE_CONTENT = 1 << 1,
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);
42 ~SSLStatus();
44 bool Equals(const SSLStatus& status) const {
45 return security_style == status.security_style &&
46 cert_id == status.cert_id && cert_status == status.cert_status &&
47 security_bits == status.security_bits &&
48 key_exchange_info == status.key_exchange_info &&
49 connection_status == status.connection_status &&
50 content_status == status.content_status &&
51 signed_certificate_timestamp_ids ==
52 status.signed_certificate_timestamp_ids;
55 content::SecurityStyle security_style;
56 // A cert_id value of 0 indicates that it is unset or invalid.
57 int cert_id;
58 net::CertStatus cert_status;
59 int security_bits;
60 int key_exchange_info;
61 int connection_status;
62 // A combination of the ContentStatusFlags above.
63 int content_status;
64 SignedCertificateTimestampIDStatusList signed_certificate_timestamp_ids;
67 } // namespace content
69 #endif // CONTENT_PUBLIC_COMMON_SSL_STATUS_H_