Index: crypto/nss_util.h |
diff --git a/crypto/nss_util.h b/crypto/nss_util.h |
index 0efdbc2b80d658843ea28ce2b020627cd0cba84b..92f238d2aed08e9fdedac17ac8dff7652423d0d4 100644 |
--- a/crypto/nss_util.h |
+++ b/crypto/nss_util.h |
@@ -23,8 +23,7 @@ class Time; |
// initialization functions. |
namespace crypto { |
-// The TPMToken name used for the NSS slot opened by ScopedTestNSSDB. |
-CRYPTO_EXPORT extern const char kTestTPMTokenName[]; |
+class ScopedTestNSSDB; |
#if defined(USE_NSS) |
// EarlySetupForNSSInit performs lightweight setup which must occur before the |
@@ -152,22 +151,21 @@ CRYPTO_EXPORT base::Time PRTimeToBaseTime(int64 prtime); |
CRYPTO_EXPORT int64 BaseTimeToPRTime(base::Time time); |
#if defined(USE_NSS) |
-// Exposed for unittests only. |
-// TODO(mattm): When NSS 3.14 is the minimum version required, |
-// switch back to using a separate user DB for each test. |
-// Because of https://bugzilla.mozilla.org/show_bug.cgi?id=588269 , the |
-// opened user DB is not automatically closed. |
-class CRYPTO_EXPORT_PRIVATE ScopedTestNSSDB { |
+#if defined(OS_CHROMEOS) |
+// Exposed for tests only. |
+class CRYPTO_EXPORT_PRIVATE ScopedTestSystemNSSKeySlot { |
Ryan Sleevi
2014/07/22 01:25:32
1) Document more what this does - and what it affe
pneubeck (no reviews)
2014/07/22 08:34:30
ACK. I only placed it here because of ScopedTestNS
pneubeck (no reviews)
2014/07/22 14:11:05
One other reason why I put it here was that it acc
|
public: |
- ScopedTestNSSDB(); |
- ~ScopedTestNSSDB(); |
+ explicit ScopedTestSystemNSSKeySlot(); |
+ ~ScopedTestSystemNSSKeySlot(); |
- bool is_open() { return is_open_; } |
+ bool ConstructedSuccessfully() const; |
private: |
- bool is_open_; |
- DISALLOW_COPY_AND_ASSIGN(ScopedTestNSSDB); |
+ scoped_ptr<ScopedTestNSSDB> test_db_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ScopedTestSystemNSSKeySlot); |
}; |
+#endif |
// NSS has a bug which can cause a deadlock or stall in some cases when writing |
// to the certDB and keyDB. It also has a bug which causes concurrent key pair |