Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Side by Side Diff: content/public/common/ssl_status.h

Issue 1332633002: Add constructor to create SSLStatus from SSLInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp: debug logging for mac/win test failure Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "content/public/common/security_style.h" 9 #include "content/public/common/security_style.h"
10 #include "content/public/common/signed_certificate_timestamp_id_and_status.h" 10 #include "content/public/common/signed_certificate_timestamp_id_and_status.h"
11 #include "net/cert/cert_status_flags.h" 11 #include "net/cert/cert_status_flags.h"
12 12
13 namespace net {
14 class SSLInfo;
15 }
16
13 namespace content { 17 namespace content {
14 18
15 // Collects the SSL information for this NavigationEntry. 19 // Collects the SSL information for this NavigationEntry.
16 struct CONTENT_EXPORT SSLStatus { 20 struct CONTENT_EXPORT SSLStatus {
17 // Flags used for the page security content status. 21 // Flags used for the page security content status.
18 enum ContentStatusFlags { 22 enum ContentStatusFlags {
19 // HTTP page, or HTTPS page with no insecure content. 23 // HTTP page, or HTTPS page with no insecure content.
20 NORMAL_CONTENT = 0, 24 NORMAL_CONTENT = 0,
21 25
22 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS). 26 // HTTPS page containing "displayed" HTTP resources (e.g. images, CSS).
23 DISPLAYED_INSECURE_CONTENT = 1 << 0, 27 DISPLAYED_INSECURE_CONTENT = 1 << 0,
24 28
25 // HTTPS page containing "executed" HTTP resources (i.e. script). 29 // HTTPS page containing "executed" HTTP resources (i.e. script).
26 // Also currently used for HTTPS page containing broken-HTTPS resources; 30 // Also currently used for HTTPS page containing broken-HTTPS resources;
27 // this is wrong and should be fixed (see comments in 31 // this is wrong and should be fixed (see comments in
28 // SSLPolicy::OnRequestStarted()). 32 // SSLPolicy::OnRequestStarted()).
29 RAN_INSECURE_CONTENT = 1 << 1, 33 RAN_INSECURE_CONTENT = 1 << 1,
30 }; 34 };
31 35
32 SSLStatus(); 36 SSLStatus();
37 SSLStatus(
38 SecurityStyle security_style,
39 int cert_id,
40 SignedCertificateTimestampIDStatusList signed_certificate_timestamp_ids,
41 const net::SSLInfo& ssl_info);
33 ~SSLStatus(); 42 ~SSLStatus();
34 43
35 bool Equals(const SSLStatus& status) const { 44 bool Equals(const SSLStatus& status) const {
meacer 2015/09/09 18:26:08 Off topic: Odd, I'm wondering why this isn't an op
estark 2015/09/10 14:32:05 Yeah I wondered that too... no idea.
36 return security_style == status.security_style && 45 return security_style == status.security_style &&
37 cert_id == status.cert_id && 46 cert_id == status.cert_id &&
38 cert_status == status.cert_status && 47 cert_status == status.cert_status &&
39 security_bits == status.security_bits && 48 security_bits == status.security_bits &&
49 connection_status == status.connection_status &&
40 content_status == status.content_status && 50 content_status == status.content_status &&
41 signed_certificate_timestamp_ids == 51 signed_certificate_timestamp_ids ==
42 status.signed_certificate_timestamp_ids; 52 status.signed_certificate_timestamp_ids;
43 } 53 }
44 54
45 content::SecurityStyle security_style; 55 content::SecurityStyle security_style;
46 // A cert_id value of 0 indicates that it is unset or invalid. 56 // A cert_id value of 0 indicates that it is unset or invalid.
47 int cert_id; 57 int cert_id;
48 net::CertStatus cert_status; 58 net::CertStatus cert_status;
49 int security_bits; 59 int security_bits;
50 int connection_status; 60 int connection_status;
51 // A combination of the ContentStatusFlags above. 61 // A combination of the ContentStatusFlags above.
52 int content_status; 62 int content_status;
53 SignedCertificateTimestampIDStatusList signed_certificate_timestamp_ids; 63 SignedCertificateTimestampIDStatusList signed_certificate_timestamp_ids;
54 }; 64 };
55 65
56 } // namespace content 66 } // namespace content
57 67
58 #endif // CONTENT_PUBLIC_COMMON_SSL_STATUS_H_ 68 #endif // CONTENT_PUBLIC_COMMON_SSL_STATUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698