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

Unified Diff: crypto/nss_util.cc

Issue 11174006: Implement ScopedTestNSSDB instead of OpenTestNSSDB() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland with suppression Created 8 years, 2 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
« no previous file with comments | « crypto/nss_util.h ('k') | net/base/nss_cert_database_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/nss_util.cc
diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc
index db89a7003a0ad0a490a6659dd83c272a591fca90..47b4d0666d5868972d452aae82987e2d29d0a0b7 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()) {
+}
+
+ScopedTestNSSDB::~ScopedTestNSSDB() {
+ // TODO(mattm): Close the dababase once NSS 3.14 is required,
+ // which fixes https://bugzilla.mozilla.org/show_bug.cgi?id=588269
+ // Resource leaks are suppressed. http://crbug.com/156433 .
}
base::Lock* GetNSSWriteLock() {
« no previous file with comments | « crypto/nss_util.h ('k') | net/base/nss_cert_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698