Chromium Code Reviews| Index: crypto/nss_util.h |
| diff --git a/crypto/nss_util.h b/crypto/nss_util.h |
| index 88d7d052fa89d7b1bbebf18de733b4a0f64d73ca..d4d532b3a5328d34eda68712cd80131af223add7 100644 |
| --- a/crypto/nss_util.h |
| +++ b/crypto/nss_util.h |
| @@ -129,10 +129,20 @@ CRYPTO_EXPORT int64 BaseTimeToPRTime(base::Time time); |
| #if defined(USE_NSS) |
| // Exposed for unittests only. |
| // TODO(mattm): when https://bugzilla.mozilla.org/show_bug.cgi?id=588269 is |
| -// fixed, switch back to using a separate userdb for each test. (Maybe refactor |
| -// to provide a ScopedTestNSSDB instead of open/close methods.) |
| -CRYPTO_EXPORT bool OpenTestNSSDB(); |
| -// NOTE: due to NSS bug 588269, mentioned above, there is no CloseTestNSSDB. |
| +// fixed, switch back to using a separate userdb for each test. |
| +// NOTE: due to NSS bug 588269, mentioned above, opened NSSDB can not be closed |
| +// automatically though this object is out of scope. After this bug is fixed, |
| +// we should add unit test to close and reopen a database. |
|
Ryan Sleevi
2012/10/16 18:19:02
high-level comment nit: Don't use "we" in comments
Takashi Toyoshima
2012/10/17 04:58:53
Done.
|
| +class CRYPTO_EXPORT ScopedTestNSSDB { |
|
Ryan Sleevi
2012/10/16 18:19:02
CRYPTO_EXPORT_PRIVATE , I believe.
Takashi Toyoshima
2012/10/17 04:58:53
Done.
|
| + public: |
| + ScopedTestNSSDB(); |
| + ~ScopedTestNSSDB(); |
| + |
| + bool is_open() { return is_open_; } |
| + |
| + private: |
| + bool is_open_; |
|
Ryan Sleevi
2012/10/16 18:19:02
DISALLOW_COPY_AND_ASSIGN(...)
Takashi Toyoshima
2012/10/17 04:58:53
Done.
|
| +}; |
| // 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 |