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

Side by Side Diff: net/base/crypto_module.h

Issue 1082123003: Rename USE_NSS to USE_NSS_CERTS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use-nss-certs
Patch Set: rebase Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « net/BUILD.gn ('k') | net/base/keygen_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_BASE_CRYPTO_MODULE_H_ 5 #ifndef NET_BASE_CRYPTO_MODULE_H_
6 #define NET_BASE_CRYPTO_MODULE_H_ 6 #define NET_BASE_CRYPTO_MODULE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "net/base/net_export.h" 12 #include "net/base/net_export.h"
13 13
14 #if defined(USE_NSS) 14 #if defined(USE_NSS_CERTS)
15 typedef struct PK11SlotInfoStr PK11SlotInfo; 15 typedef struct PK11SlotInfoStr PK11SlotInfo;
16 #endif 16 #endif
17 17
18 namespace net { 18 namespace net {
19 19
20 class CryptoModule; 20 class CryptoModule;
21 21
22 typedef std::vector<scoped_refptr<CryptoModule> > CryptoModuleList; 22 typedef std::vector<scoped_refptr<CryptoModule> > CryptoModuleList;
23 23
24 class NET_EXPORT CryptoModule 24 class NET_EXPORT CryptoModule
25 : public base::RefCountedThreadSafe<CryptoModule> { 25 : public base::RefCountedThreadSafe<CryptoModule> {
26 public: 26 public:
27 #if defined(USE_NSS) 27 #if defined(USE_NSS_CERTS)
28 typedef PK11SlotInfo* OSModuleHandle; 28 typedef PK11SlotInfo* OSModuleHandle;
29 #else 29 #else
30 typedef void* OSModuleHandle; 30 typedef void* OSModuleHandle;
31 #endif 31 #endif
32 32
33 OSModuleHandle os_module_handle() const { return module_handle_; } 33 OSModuleHandle os_module_handle() const { return module_handle_; }
34 34
35 std::string GetTokenName() const; 35 std::string GetTokenName() const;
36 36
37 static CryptoModule* CreateFromHandle(OSModuleHandle handle); 37 static CryptoModule* CreateFromHandle(OSModuleHandle handle);
38 38
39 private: 39 private:
40 friend class base::RefCountedThreadSafe<CryptoModule>; 40 friend class base::RefCountedThreadSafe<CryptoModule>;
41 41
42 explicit CryptoModule(OSModuleHandle handle); 42 explicit CryptoModule(OSModuleHandle handle);
43 ~CryptoModule(); 43 ~CryptoModule();
44 44
45 OSModuleHandle module_handle_; 45 OSModuleHandle module_handle_;
46 46
47 DISALLOW_COPY_AND_ASSIGN(CryptoModule); 47 DISALLOW_COPY_AND_ASSIGN(CryptoModule);
48 }; 48 };
49 49
50 } // namespace net 50 } // namespace net
51 51
52 #endif // NET_BASE_CRYPTO_MODULE_H_ 52 #endif // NET_BASE_CRYPTO_MODULE_H_
OLDNEW
« no previous file with comments | « net/BUILD.gn ('k') | net/base/keygen_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698