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

Unified Diff: crypto/nss_util.cc

Issue 7066070: Search all slots when looking for a key in NSS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adding blank line Created 9 years, 6 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 | « no previous file | crypto/nss_util_internal.h » ('j') | crypto/nss_util_internal.h » ('J')
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 d4f08556e79ff0fd95a3a658de1556703b853a06..0c8f7a87659950db9f90364290ab8369bf9ba90a 100644
--- a/crypto/nss_util.cc
+++ b/crypto/nss_util.cc
@@ -155,24 +155,6 @@ void UseLocalCacheOfNSSDatabaseIfNFS(const FilePath& database_dir) {
#endif // defined(OS_LINUX)
}
-// A helper class that acquires the SECMOD list read lock while the
-// AutoSECMODListReadLock is in scope.
-class AutoSECMODListReadLock {
- public:
- AutoSECMODListReadLock()
- : lock_(SECMOD_GetDefaultModuleListLock()) {
- SECMOD_GetReadLock(lock_);
- }
-
- ~AutoSECMODListReadLock() {
- SECMOD_ReleaseReadLock(lock_);
- }
-
- private:
- SECMODListLock* lock_;
- DISALLOW_COPY_AND_ASSIGN(AutoSECMODListReadLock);
-};
-
PK11SlotInfo* FindSlotWithTokenName(const std::string& token_name) {
AutoSECMODListReadLock auto_lock;
SECMODModuleList* head = SECMOD_GetDefaultModuleList();
@@ -670,6 +652,16 @@ AutoNSSWriteLock::~AutoNSSWriteLock() {
lock_->Release();
}
}
+
+AutoSECMODListReadLock::AutoSECMODListReadLock()
+ : lock_(SECMOD_GetDefaultModuleListLock()) {
+ SECMOD_GetReadLock(lock_);
+ }
+
+AutoSECMODListReadLock::~AutoSECMODListReadLock() {
+ SECMOD_ReleaseReadLock(lock_);
+}
+
#endif // defined(USE_NSS)
#if defined(OS_CHROMEOS)
« no previous file with comments | « no previous file | crypto/nss_util_internal.h » ('j') | crypto/nss_util_internal.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698