Remove CryptAcquireContextLocked.
With keygen gone, this is no longer called.
BUG=none
Review-Url: https://codereview.chromium.org/2606393002
Cr-Commit-Position: refs/heads/master@{#441226}
diff --git a/crypto/capi_util.cc b/crypto/capi_util.cc
index 7adfeb8..1e199db 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);
}