| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "content/public/browser/ssl_status.h" | 5 #include "content/public/browser/ssl_status.h" |
| 6 | 6 |
| 7 #include "net/cert/sct_status_flags.h" | 7 #include "net/cert/sct_status_flags.h" |
| 8 #include "net/ssl/ssl_info.h" | 8 #include "net/ssl/ssl_info.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 SSLStatus::SSLStatus() | 12 SSLStatus::SSLStatus() |
| 13 : security_style(SECURITY_STYLE_UNKNOWN), | 13 : initialized(false), |
| 14 cert_status(0), | 14 cert_status(0), |
| 15 security_bits(-1), | 15 security_bits(-1), |
| 16 key_exchange_group(0), | 16 key_exchange_group(0), |
| 17 connection_status(0), | 17 connection_status(0), |
| 18 content_status(NORMAL_CONTENT), | 18 content_status(NORMAL_CONTENT), |
| 19 pkp_bypassed(false) {} | 19 pkp_bypassed(false) {} |
| 20 | 20 |
| 21 SSLStatus::SSLStatus(SecurityStyle security_style, | 21 SSLStatus::SSLStatus(scoped_refptr<net::X509Certificate> certificate, |
| 22 scoped_refptr<net::X509Certificate> certificate, | |
| 23 const net::SSLInfo& ssl_info) | 22 const net::SSLInfo& ssl_info) |
| 24 : security_style(security_style), | 23 : initialized(true), |
| 25 certificate(certificate), | 24 certificate(certificate), |
| 26 cert_status(ssl_info.cert_status), | 25 cert_status(ssl_info.cert_status), |
| 27 security_bits(ssl_info.security_bits), | 26 security_bits(ssl_info.security_bits), |
| 28 key_exchange_group(ssl_info.key_exchange_group), | 27 key_exchange_group(ssl_info.key_exchange_group), |
| 29 connection_status(ssl_info.connection_status), | 28 connection_status(ssl_info.connection_status), |
| 30 content_status(NORMAL_CONTENT), | 29 content_status(NORMAL_CONTENT), |
| 31 pkp_bypassed(ssl_info.pkp_bypassed) { | 30 pkp_bypassed(ssl_info.pkp_bypassed) { |
| 32 for (const auto& sct_and_status : ssl_info.signed_certificate_timestamps) { | 31 for (const auto& sct_and_status : ssl_info.signed_certificate_timestamps) { |
| 33 sct_statuses.push_back(sct_and_status.status); | 32 sct_statuses.push_back(sct_and_status.status); |
| 34 } | 33 } |
| 35 } | 34 } |
| 36 | 35 |
| 37 SSLStatus::SSLStatus(const SSLStatus& other) = default; | 36 SSLStatus::SSLStatus(const SSLStatus& other) = default; |
| 38 | 37 |
| 39 SSLStatus::~SSLStatus() {} | 38 SSLStatus::~SSLStatus() {} |
| 40 | 39 |
| 41 } // namespace content | 40 } // namespace content |
| OLD | NEW |