| 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);
|
| }
|
|
|