Fix infinite recursion on hiding panel when created during fullscreen mode.
[chromium-blink-merge.git] / net / ssl / ssl_info.cc
blob77ddb62e7747391eb25bc7cb668cfd48be1e0616
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 #include "net/ssl/ssl_info.h"
7 #include "base/pickle.h"
8 #include "net/cert/cert_status_flags.h"
9 #include "net/cert/signed_certificate_timestamp.h"
10 #include "net/cert/x509_certificate.h"
12 namespace net {
14 SSLInfo::SSLInfo() {
15 Reset();
18 SSLInfo::SSLInfo(const SSLInfo& info) {
19 *this = info;
22 SSLInfo::~SSLInfo() {
25 SSLInfo& SSLInfo::operator=(const SSLInfo& info) {
26 cert = info.cert;
27 cert_status = info.cert_status;
28 security_bits = info.security_bits;
29 connection_status = info.connection_status;
30 is_issued_by_known_root = info.is_issued_by_known_root;
31 client_cert_sent = info.client_cert_sent;
32 channel_id_sent = info.channel_id_sent;
33 handshake_type = info.handshake_type;
34 public_key_hashes = info.public_key_hashes;
35 signed_certificate_timestamps = info.signed_certificate_timestamps;
37 return *this;
40 void SSLInfo::Reset() {
41 cert = NULL;
42 cert_status = 0;
43 security_bits = -1;
44 connection_status = 0;
45 is_issued_by_known_root = false;
46 client_cert_sent = false;
47 channel_id_sent = false;
48 handshake_type = HANDSHAKE_UNKNOWN;
49 public_key_hashes.clear();
50 signed_certificate_timestamps.clear();
53 void SSLInfo::SetCertError(int error) {
54 cert_status |= MapNetErrorToCertStatus(error);
57 } // namespace net