Index: net/cert/test_root_certs_nss.cc |
diff --git a/net/cert/test_root_certs_nss.cc b/net/cert/test_root_certs_nss.cc |
index 3a2f88a79684eabb9ce39fda39e052bacd96e2f8..3c271452fafd0af62562b41393a4a761e45769e5 100644 |
--- a/net/cert/test_root_certs_nss.cc |
+++ b/net/cert/test_root_certs_nss.cc |
@@ -114,6 +114,17 @@ bool TestRootCerts::IsEmpty() const { |
return trust_cache_.empty(); |
} |
+#if defined(USE_NSS) |
+bool TestRootCerts::Contains(CERTCertificate* cert) const { |
+ for (std::list<TrustEntry*>::const_iterator it = trust_cache_.begin(); |
+ it != trust_cache_.end(); ++it) { |
+ if (X509Certificate::IsSameOSCert(cert, (*it)->certificate())) |
+ return true; |
+ } |
+ return false; |
+} |
+#endif |
+ |
TestRootCerts::~TestRootCerts() { |
Clear(); |
} |