OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 BASE_NSS_UTIL_H_ | 5 #ifndef BASE_NSS_UTIL_H_ |
6 #define BASE_NSS_UTIL_H_ | 6 #define BASE_NSS_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 // NSS checks whether it is running a forked process to avoid problems when | 58 // NSS checks whether it is running a forked process to avoid problems when |
59 // using user security modules in a forked process. However if we are sure | 59 // using user security modules in a forked process. However if we are sure |
60 // there are no modules loaded before the process is forked then there is no | 60 // there are no modules loaded before the process is forked then there is no |
61 // harm disabling the check. | 61 // harm disabling the check. |
62 // | 62 // |
63 // This method must be called before EnsureNSSInit() to take effect. | 63 // This method must be called before EnsureNSSInit() to take effect. |
64 // | 64 // |
65 // WARNING: Use this with caution. | 65 // WARNING: Use this with caution. |
66 void DisableNSSForkCheck(); | 66 void DisableNSSForkCheck(); |
67 | 67 |
68 // Load NSS library files. This function only has effect on Linux. | |
wtc
2011/03/17 20:03:55
Nit: since NSS is also used on FreeBSD, etc., it w
Alpha Left Google
2011/03/17 22:31:34
Done.
| |
69 void LoadNSSLibraries(); | |
70 | |
68 // Check if the current NSS version is greater than or equals to |version|. | 71 // Check if the current NSS version is greater than or equals to |version|. |
69 // A sample version string is "3.12.3". | 72 // A sample version string is "3.12.3". |
70 bool CheckNSSVersion(const char* version); | 73 bool CheckNSSVersion(const char* version); |
71 | 74 |
72 #if defined(OS_CHROMEOS) | 75 #if defined(OS_CHROMEOS) |
73 // Open the r/w nssdb that's stored inside the user's encrypted home directory. | 76 // Open the r/w nssdb that's stored inside the user's encrypted home directory. |
74 void OpenPersistentNSSDB(); | 77 void OpenPersistentNSSDB(); |
75 #endif | 78 #endif |
76 | 79 |
77 // Convert a NSS PRTime value into a base::Time object. | 80 // Convert a NSS PRTime value into a base::Time object. |
(...skipping 26 matching lines...) Expand all Loading... | |
104 private: | 107 private: |
105 Lock *lock_; | 108 Lock *lock_; |
106 DISALLOW_COPY_AND_ASSIGN(AutoNSSWriteLock); | 109 DISALLOW_COPY_AND_ASSIGN(AutoNSSWriteLock); |
107 }; | 110 }; |
108 | 111 |
109 #endif // defined(USE_NSS) | 112 #endif // defined(USE_NSS) |
110 | 113 |
111 } // namespace base | 114 } // namespace base |
112 | 115 |
113 #endif // BASE_NSS_UTIL_H_ | 116 #endif // BASE_NSS_UTIL_H_ |
OLD | NEW |