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

Unified Diff: net/cert/test_root_certs.h

Issue 137553004: NSS Cros multiprofile: trust roots added by a profile shouldn't apply to other profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: handle additional trust roots, add TestRootCertsTest.Contains, remove instantiated certtests from c… Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: net/cert/test_root_certs.h
diff --git a/net/cert/test_root_certs.h b/net/cert/test_root_certs.h
index 03cedcc93385d280eca3971d83faad883e32fd94..c95c5d432b8ed6db51851adda849e0a40a59f430 100644
--- a/net/cert/test_root_certs.h
+++ b/net/cert/test_root_certs.h
@@ -9,6 +9,7 @@
#include "base/memory/ref_counted.h"
#include "build/build_config.h"
#include "net/base/net_export.h"
+#include "net/cert/x509_certificate.h"
#if defined(USE_NSS) || defined(OS_IOS)
#include <list>
@@ -29,12 +30,10 @@ class FilePath;
namespace net {
-class X509Certificate;
-
// TestRootCerts is a helper class for unit tests that is used to
// artificially mark a certificate as trusted, independent of the local
// machine configuration.
-class NET_EXPORT_PRIVATE TestRootCerts {
+class NET_EXPORT TestRootCerts {
public:
// Obtains the Singleton instance to the trusted certificates.
static TestRootCerts* GetInstance();
@@ -83,6 +82,11 @@ class NET_EXPORT_PRIVATE TestRootCerts {
HCERTCHAINENGINE GetChainEngine() const;
#endif
+#if defined(USE_NSS) || defined(OS_IOS) || \
+ (defined(USE_OPENSSL) && !defined(OS_ANDROID))
+ bool Contains(X509Certificate::OSCertHandle cert) const;
Ryan Sleevi 2014/01/30 05:27:40 Not a terrible fan of passing the OSCertHandle, al
mattm 2014/02/04 05:31:21 Done.
+#endif
+
private:
friend struct base::DefaultLazyInstanceTraits<TestRootCerts>;

Powered by Google App Engine
This is Rietveld 408576698