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

Unified Diff: crypto/capi_util.cc

Issue 2606393002: Remove CryptAcquireContextLocked. (Closed)
Patch Set: Created 3 years, 12 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/capi_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/capi_util.cc
diff --git a/crypto/capi_util.cc b/crypto/capi_util.cc
index 7adfeb8ca5015eb809aad6620b990ff7ffa2ff50..1e199db1c457a391478a3ab5edb7bf768ea28720 100644
--- a/crypto/capi_util.cc
+++ b/crypto/capi_util.cc
@@ -5,49 +5,10 @@
#include "crypto/capi_util.h"
#include <stddef.h>
-
-#include "base/macros.h"
-#include "base/memory/singleton.h"
-#include "base/synchronization/lock.h"
-
-namespace {
-
-class CAPIUtilSingleton {
- public:
- static CAPIUtilSingleton* GetInstance() {
- return base::Singleton<CAPIUtilSingleton>::get();
- }
-
- // Returns a lock to guard calls to CryptAcquireContext with
- // CRYPT_DELETEKEYSET or CRYPT_NEWKEYSET.
- base::Lock& acquire_context_lock() {
- return acquire_context_lock_;
- }
-
- private:
- friend class base::Singleton<CAPIUtilSingleton>;
- friend struct base::DefaultSingletonTraits<CAPIUtilSingleton>;
-
- CAPIUtilSingleton() {}
-
- base::Lock acquire_context_lock_;
-
- DISALLOW_COPY_AND_ASSIGN(CAPIUtilSingleton);
-};
-
-} // namespace
+#include <stdlib.h>
namespace crypto {
-BOOL CryptAcquireContextLocked(HCRYPTPROV* prov,
- LPCWSTR container,
- LPCWSTR provider,
- DWORD prov_type,
- DWORD flags) {
- base::AutoLock lock(CAPIUtilSingleton::GetInstance()->acquire_context_lock());
- return CryptAcquireContext(prov, container, provider, prov_type, flags);
-}
-
void* WINAPI CryptAlloc(size_t size) {
return malloc(size);
}
« no previous file with comments | « crypto/capi_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698