| // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #ifndef NET_BASE_CRYPTO_MODULE_H_ |
| #define NET_BASE_CRYPTO_MODULE_H_ |
| #include "base/memory/ref_counted.h" |
| #include "net/base/net_export.h" |
| typedef struct PK11SlotInfoStr PK11SlotInfo; |
| typedef std::vector<scoped_refptr<CryptoModule> > CryptoModuleList; |
| class NET_EXPORT CryptoModule |
| : public base::RefCountedThreadSafe<CryptoModule> { |
| typedef PK11SlotInfo* OSModuleHandle; |
| typedef void* OSModuleHandle; |
| OSModuleHandle os_module_handle() const { return module_handle_; } |
| std::string GetTokenName() const; |
| static CryptoModule* CreateFromHandle(OSModuleHandle handle); |
| friend class base::RefCountedThreadSafe<CryptoModule>; |
| explicit CryptoModule(OSModuleHandle handle); |
| OSModuleHandle module_handle_; |
| DISALLOW_COPY_AND_ASSIGN(CryptoModule); |
| #endif // NET_BASE_CRYPTO_MODULE_H_ |