Roll src/third_party/WebKit a452221:9ff6d11 (svn 202117:202119)
[chromium-blink-merge.git] / content / public / common / ssl_status.h
blobf0a9b1fce02a2fa9f7c4908ccd195d466a313fda
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 content {
15 // Collects the SSL information for this NavigationEntry.
16 struct CONTENT_EXPORT SSLStatus {
17 // Flags used for the page security content status.
18 enum ContentStatusFlags {
19 // HTTP page, or HTTPS page with no insecure content.
20 NORMAL_CONTENT = 0,
22 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS).
23 DISPLAYED_INSECURE_CONTENT = 1 << 0,
25 // HTTPS page containing "executed" HTTP resources (i.e. script).
26 // Also currently used for HTTPS page containing broken-HTTPS resources;
27 // this is wrong and should be fixed (see comments in
28 // SSLPolicy::OnRequestStarted()).
29 RAN_INSECURE_CONTENT = 1 << 1,
32 SSLStatus();
33 ~SSLStatus();
35 bool Equals(const SSLStatus& status) const {
36 return security_style == status.security_style &&
37 cert_id == status.cert_id &&
38 cert_status == status.cert_status &&
39 security_bits == status.security_bits &&
40 content_status == status.content_status &&
41 signed_certificate_timestamp_ids ==
42 status.signed_certificate_timestamp_ids;
45 content::SecurityStyle security_style;
46 // A cert_id value of 0 indicates that it is unset or invalid.
47 int cert_id;
48 net::CertStatus cert_status;
49 int security_bits;
50 int connection_status;
51 // A combination of the ContentStatusFlags above.
52 int content_status;
53 SignedCertificateTimestampIDStatusList signed_certificate_timestamp_ids;
56 } // namespace content
58 #endif // CONTENT_PUBLIC_COMMON_SSL_STATUS_H_