Index: chrome/browser/chromeos/net/nss_cert_database_cros.h |
diff --git a/chrome/browser/chromeos/net/nss_cert_database_cros.h b/chrome/browser/chromeos/net/nss_cert_database_cros.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..494afb466ccf1de1293df78c843dd5015d72da10 |
--- /dev/null |
+++ b/chrome/browser/chromeos/net/nss_cert_database_cros.h |
@@ -0,0 +1,50 @@ |
+// Copyright (c) 2013 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. |
+ |
+#ifndef CHROME_BROWSER_CHROMEOS_NET_NSS_CERT_DATABASE_CROS_ |
+#define CHROME_BROWSER_CHROMEOS_NET_NSS_CERT_DATABASE_CROS_ |
+ |
+#include "chrome/browser/chromeos/net/profile_cert_filter.h" |
+#include "crypto/scoped_nss_types.h" |
+#include "net/cert/nss_cert_database.h" |
+ |
+namespace net { |
+class CryptoModule; |
+typedef std::vector<scoped_refptr<CryptoModule> > CryptoModuleList; |
+class X509Certificate; |
+typedef std::vector<scoped_refptr<X509Certificate> > CertificateList; |
+} |
+ |
+namespace chromeos { |
+ |
+class NSSCertDatabaseCros : public net::NSSCertDatabase { |
+ public: |
+ NSSCertDatabaseCros(crypto::ScopedPK11Slot public_slot, |
+ crypto::ScopedPK11Slot private_slot); |
+ virtual ~NSSCertDatabaseCros(); |
+ |
+ // net::NSSCertDatabase implementation. |
+ virtual void ListCerts(net::CertificateList* certs) OVERRIDE; |
+ virtual void ListModules(net::CryptoModuleList* modules, bool need_rw) const |
+ OVERRIDE; |
+ // TODO(mattm): handle trust setting, deletion, etc correctly when certs exist |
+ // in multiple slots. |
+ // TODO(mattm): handle trust setting correctly for certs in read-only slots. |
+ |
+ protected: |
+ // net::NSSCertDatabase implementation. |
+ virtual crypto::ScopedPK11Slot GetPublicSlot() const OVERRIDE; |
+ virtual crypto::ScopedPK11Slot GetPrivateSlot() const OVERRIDE; |
+ |
+ private: |
+ crypto::ScopedPK11Slot public_slot_; |
+ crypto::ScopedPK11Slot private_slot_; |
+ ProfileCertFilter profile_cert_filter_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(NSSCertDatabaseCros); |
+}; |
+ |
+} // namespace chromeos |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_NET_NSS_CERT_DATABASE_CROS_ |