This source file includes following definitions.
- GetInstance
- lock
- GetMacSecurityServicesLock
#include "crypto/mac_security_services_lock.h"
#include "base/memory/singleton.h"
#include "base/synchronization/lock.h"
namespace {
class SecurityServicesSingleton {
public:
static SecurityServicesSingleton* GetInstance() {
return Singleton<SecurityServicesSingleton,
LeakySingletonTraits<SecurityServicesSingleton> >::get();
}
base::Lock& lock() { return lock_; }
private:
friend struct DefaultSingletonTraits<SecurityServicesSingleton>;
SecurityServicesSingleton() {}
~SecurityServicesSingleton() {}
base::Lock lock_;
DISALLOW_COPY_AND_ASSIGN(SecurityServicesSingleton);
};
}
namespace crypto {
base::Lock& GetMacSecurityServicesLock() {
return SecurityServicesSingleton::GetInstance()->lock();
}
}