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

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

Issue 10916094: Move the NSS functions out of CertDatabase into a new NSSCertDatabase class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 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 | Annotate | Revision Log
OLDNEW
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 #ifndef NET_BASE_SSL_CLIENT_AUTH_CACHE_H_ 5 #ifndef NET_BASE_SSL_CLIENT_AUTH_CACHE_H_
6 #define NET_BASE_SSL_CLIENT_AUTH_CACHE_H_ 6 #define NET_BASE_SSL_CLIENT_AUTH_CACHE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <map> 9 #include <map>
10 10
(...skipping 29 matching lines...) Expand all
40 // Add a client certificate for |server| to the cache. If there is already 40 // Add a client certificate for |server| to the cache. If there is already
41 // a client certificate for |server|, it will be overwritten. A NULL 41 // a client certificate for |server|, it will be overwritten. A NULL
42 // |client_cert| indicates a preference that no client certificate should 42 // |client_cert| indicates a preference that no client certificate should
43 // be sent to |server|. 43 // be sent to |server|.
44 void Add(const std::string& server, X509Certificate* client_cert); 44 void Add(const std::string& server, X509Certificate* client_cert);
45 45
46 // Remove the client certificate for |server| from the cache, if one exists. 46 // Remove the client certificate for |server| from the cache, if one exists.
47 void Remove(const std::string& server); 47 void Remove(const std::string& server);
48 48
49 // CertDatabase::Observer methods: 49 // CertDatabase::Observer methods:
50 virtual void OnUserCertAdded(const X509Certificate* cert) OVERRIDE; 50 virtual void OnCertAdded(const X509Certificate* cert) OVERRIDE;
51 51
52 private: 52 private:
53 typedef std::string AuthCacheKey; 53 typedef std::string AuthCacheKey;
54 typedef scoped_refptr<X509Certificate> AuthCacheValue; 54 typedef scoped_refptr<X509Certificate> AuthCacheValue;
55 typedef std::map<AuthCacheKey, AuthCacheValue> AuthCacheMap; 55 typedef std::map<AuthCacheKey, AuthCacheValue> AuthCacheMap;
56 56
57 // internal representation of cache, an STL map. 57 // internal representation of cache, an STL map.
58 AuthCacheMap cache_; 58 AuthCacheMap cache_;
59 }; 59 };
60 60
61 } // namespace net 61 } // namespace net
62 62
63 #endif // NET_BASE_SSL_CLIENT_AUTH_CACHE_H_ 63 #endif // NET_BASE_SSL_CLIENT_AUTH_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698