Chromium Code Reviews| Index: crypto/nss_util.cc |
| diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc |
| index db89a7003a0ad0a490a6659dd83c272a591fca90..9c7bf94d5d3b471e5fa34fda4f6948c96086cfe3 100644 |
| --- a/crypto/nss_util.cc |
| +++ b/crypto/nss_util.cc |
| @@ -702,8 +702,14 @@ bool CheckNSSVersion(const char* version) { |
| } |
| #if defined(USE_NSS) |
| -bool OpenTestNSSDB() { |
| - return g_nss_singleton.Get().OpenTestNSSDB(); |
| +ScopedTestNSSDB::ScopedTestNSSDB() |
| + : is_open_(g_nss_singleton.Get().OpenTestNSSDB()) { |
| + DCHECK(is_open_); |
|
Ryan Sleevi
2012/10/16 18:19:02
Do not DCHECK here - this will crash tests in debu
Takashi Toyoshima
2012/10/17 04:58:53
Done.
|
| +} |
| + |
| +ScopedTestNSSDB::~ScopedTestNSSDB() { |
| + // TODO(mattm): Close dababase after |
| + // https://bugzilla.mozilla.org/show_bug.cgi?id=588269 is fixed. |
|
Ryan Sleevi
2012/10/16 18:19:02
// TODO(mattm): Close the database once NSS 3.14 i
Takashi Toyoshima
2012/10/17 04:58:53
Done.
|
| } |
| base::Lock* GetNSSWriteLock() { |