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

Side by Side Diff: net/base/ssl_info.h

Issue 7276: Adding security info to canceled requests (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 NET_BASE_SSL_INFO_H_ 5 #ifndef NET_BASE_SSL_INFO_H_
6 #define NET_BASE_SSL_INFO_H_ 6 #define NET_BASE_SSL_INFO_H_
7 7
8 #include "net/base/cert_status_flags.h" 8 #include "net/base/cert_status_flags.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/base/x509_certificate.h" 10 #include "net/base/x509_certificate.h"
11 11
12 namespace net { 12 namespace net {
13 13
14 // SSL connection info. 14 // SSL connection info.
15 // This is really a struct. All members are public. 15 // This is really a struct. All members are public.
16 class SSLInfo { 16 class SSLInfo {
17 public: 17 public:
18 SSLInfo() : cert_status(0), security_bits(-1) { } 18 SSLInfo() : cert_status(0), security_bits(-1) { }
19 19
20 SSLInfo(const SSLInfo& ssl_info)
darin (slow to review) 2009/03/05 00:01:16 what's wrong with the default copy constructor and
21 : cert(ssl_info.cert),
22 cert_status(ssl_info.cert_status),
23 security_bits(ssl_info.security_bits) { }
24
25 SSLInfo& operator=(const SSLInfo& ssl_info) {
26 if (this != &ssl_info) {
27 cert = ssl_info.cert;
28 cert_status = ssl_info.cert_status;
29 security_bits = ssl_info.security_bits;
30 }
31 return *this;
32 }
33
20 void Reset() { 34 void Reset() {
21 cert = NULL; 35 cert = NULL;
22 security_bits = -1; 36 security_bits = -1;
23 cert_status = 0; 37 cert_status = 0;
24 } 38 }
25 39
26 bool is_valid() const { return cert != NULL; } 40 bool is_valid() const { return cert != NULL; }
27 41
28 // Adds the specified |error| to the cert status. 42 // Adds the specified |error| to the cert status.
29 void SetCertError(int error) { 43 void SetCertError(int error) {
(...skipping 11 matching lines...) Expand all
41 // The security strength, in bits, of the SSL cipher suite. 55 // The security strength, in bits, of the SSL cipher suite.
42 // 0 means the connection is not encrypted. 56 // 0 means the connection is not encrypted.
43 // -1 means the security strength is unknown. 57 // -1 means the security strength is unknown.
44 int security_bits; 58 int security_bits;
45 }; 59 };
46 60
47 } // namespace net 61 } // namespace net
48 62
49 #endif // NET_BASE_SSL_INFO_H_ 63 #endif // NET_BASE_SSL_INFO_H_
50 64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698