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

Side by Side Diff: chromeos/network/client_cert_store_chromeos.h

Issue 419013003: Replace c/b/nss_context by a KeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added Linux implementation. Created 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SSL_CLIENT_CERT_STORE_CHROMEOS_H_ 5 #ifndef CHROMEOS_NETWORK_CLIENT_CERT_STORE_CHROMEOS_H_
6 #define NET_SSL_CLIENT_CERT_STORE_CHROMEOS_H_ 6 #define CHROMEOS_NETWORK_CLIENT_CERT_STORE_CHROMEOS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/weak_ptr.h"
11 #include "chromeos/chromeos_export.h"
10 #include "crypto/scoped_nss_types.h" 12 #include "crypto/scoped_nss_types.h"
11 #include "net/cert/nss_profile_filter_chromeos.h" 13 #include "net/cert/nss_profile_filter_chromeos.h"
12 #include "net/ssl/client_cert_store_nss.h" 14 #include "net/ssl/client_cert_store_nss.h"
13 15
16 class CertDatabaseServiceIOPart;
17
14 namespace net { 18 namespace net {
19 class NSSCertDatabase;
20 }
15 21
16 class NET_EXPORT ClientCertStoreChromeOS : public ClientCertStoreNSS { 22 namespace chromeos {
23
24 class CHROMEOS_EXPORT ClientCertStoreChromeOS : public net::ClientCertStoreNSS {
17 public: 25 public:
18 // Constructs a ClientCertStore that will return client certs available on 26 // Constructs a ClientCertStore that will return client certs available on
19 // the user's private and public slots. If |use_system_slot| is true, certs on 27 // the user's private and public slots. If |use_system_slot| is true, certs on
20 // the system slot will also be returned. 28 // the system slot will also be returned.
21 ClientCertStoreChromeOS( 29 ClientCertStoreChromeOS(
22 bool use_system_slot, 30 const base::WeakPtr<CertDatabaseServiceIOPart>& cert_db_io,
23 const std::string& username_hash,
24 const PasswordDelegateFactory& password_delegate_factory); 31 const PasswordDelegateFactory& password_delegate_factory);
25 virtual ~ClientCertStoreChromeOS(); 32 virtual ~ClientCertStoreChromeOS();
26 33
27 // ClientCertStoreNSS: 34 // ClientCertStoreNSS:
28 virtual void GetClientCerts(const SSLCertRequestInfo& cert_request_info, 35 virtual void GetClientCerts(const net::SSLCertRequestInfo& cert_request_info,
29 CertificateList* selected_certs, 36 net::CertificateList* selected_certs,
30 const base::Closure& callback) OVERRIDE; 37 const base::Closure& callback) OVERRIDE;
31 38
32 protected: 39 protected:
33 // ClientCertStoreNSS: 40 // ClientCertStoreNSS:
34 virtual void GetClientCertsImpl(CERTCertList* cert_list, 41 virtual void GetClientCertsImpl(
35 const SSLCertRequestInfo& request, 42 CERTCertList* cert_list,
36 bool query_nssdb, 43 const net::SSLCertRequestInfo& request,
37 CertificateList* selected_certs) OVERRIDE; 44 bool query_nssdb,
45 net::CertificateList* selected_certs) OVERRIDE;
38 46
39 private: 47 private:
40 void DidGetSystemAndPrivateSlot(const SSLCertRequestInfo* request, 48 void DidGetNSSCertDatabase(const net::SSLCertRequestInfo* request,
41 CertificateList* selected_certs, 49 net::CertificateList* selected_certs,
42 const base::Closure& callback, 50 const base::Closure& callback,
43 crypto::ScopedPK11Slot system_slot, 51 net::NSSCertDatabase* nss_cert_db);
44 crypto::ScopedPK11Slot private_slot);
45 52
46 bool use_system_slot_; 53 base::WeakPtr<CertDatabaseServiceIOPart> cert_db_io_;
47 std::string username_hash_; 54 net::NSSProfileFilterChromeOS profile_filter_;
48 NSSProfileFilterChromeOS profile_filter_;
49 55
50 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreChromeOS); 56 DISALLOW_COPY_AND_ASSIGN(ClientCertStoreChromeOS);
51 }; 57 };
52 58
53 } // namespace net 59 } // namespace chromeos
54 60
55 #endif // NET_SSL_CLIENT_CERT_STORE_CHROMEOS_H_ 61 #endif // CHROMEOS_NETWORK_CLIENT_CERT_STORE_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698