summaryrefslogtreecommitdiffstats
path: root/net/base/ssl_info.cc
diff options
context:
space:
mode:
authorIain Merrick <husky@google.com>2010-10-19 14:37:37 +0100
committerIain Merrick <husky@google.com>2010-10-19 14:37:37 +0100
commit3345a6884c488ff3a535c2c9acdd33d74b37e311 (patch)
tree7784b988ef1698cb6967ea1bdf07616237716c6c /net/base/ssl_info.cc
parentefc8475837ec58186051f23bb03542620424f6ce (diff)
downloadexternal_chromium-3345a6884c488ff3a535c2c9acdd33d74b37e311.zip
external_chromium-3345a6884c488ff3a535c2c9acdd33d74b37e311.tar.gz
external_chromium-3345a6884c488ff3a535c2c9acdd33d74b37e311.tar.bz2
Merge Chromium at 7.0.540.0 : Initial merge by git
Not including third_party/icu as it contains huge data files that break Gerrit, and aren't actually used. Change-Id: I428a386e70f3b58cacd28677b8cfda282e891e15
Diffstat (limited to 'net/base/ssl_info.cc')
-rw-r--r--net/base/ssl_info.cc47
1 files changed, 47 insertions, 0 deletions
diff --git a/net/base/ssl_info.cc b/net/base/ssl_info.cc
new file mode 100644
index 0000000..1b60644
--- /dev/null
+++ b/net/base/ssl_info.cc
@@ -0,0 +1,47 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/base/ssl_info.h"
+
+#include "net/base/cert_status_flags.h"
+#include "net/base/x509_certificate.h"
+
+namespace net {
+
+SSLInfo::SSLInfo()
+ : cert_status(0),
+ security_bits(-1),
+ connection_status(0) {
+}
+
+SSLInfo::SSLInfo(const SSLInfo& info)
+ : cert(info.cert),
+ cert_status(info.cert_status),
+ security_bits(info.security_bits),
+ connection_status(info.connection_status) {
+}
+
+SSLInfo::~SSLInfo() {
+}
+
+SSLInfo& SSLInfo::operator=(const SSLInfo& info) {
+ cert = info.cert;
+ cert_status = info.cert_status;
+ security_bits = info.security_bits;
+ connection_status = info.connection_status;
+ return *this;
+}
+
+void SSLInfo::Reset() {
+ cert = NULL;
+ cert_status = 0;
+ security_bits = -1;
+ connection_status = 0;
+}
+
+void SSLInfo::SetCertError(int error) {
+ cert_status |= MapNetErrorToCertStatus(error);
+}
+
+} // namespace net