Chromium Code Reviews| 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 |
| 11 #if defined(USE_NSS) | 11 #if defined(USE_NSS) |
| 12 class FilePath; | 12 class FilePath; |
| 13 #endif // defined(USE_NSS) | 13 #endif // defined(USE_NSS) |
| 14 | 14 |
| 15 // This file specifically doesn't depend on any NSS or NSPR headers because it | 15 // This file specifically doesn't depend on any NSS or NSPR headers because it |
| 16 // is included by various (non-crypto) parts of chrome to call the | 16 // is included by various (non-crypto) parts of chrome to call the |
| 17 // initialization functions. | 17 // initialization functions. |
| 18 namespace base { | 18 namespace base { |
| 19 | 19 |
| 20 class Lock; | 20 class Lock; |
| 21 class Time; | 21 class Time; |
| 22 | 22 |
| 23 // EarlyNSSInit performs lightweight setup which must occur before the process | |
| 24 // goes multithreaded. | |
| 25 void EarlyNSSInit(); | |
|
wtc
2011/01/13 00:07:02
The comment should point out that this function do
| |
| 26 | |
| 23 // Initialize NRPR if it isn't already initialized. This function is | 27 // Initialize NRPR if it isn't already initialized. This function is |
| 24 // thread-safe, and NSPR will only ever be initialized once. NSPR will be | 28 // thread-safe, and NSPR will only ever be initialized once. NSPR will be |
| 25 // properly shut down on program exit. | 29 // properly shut down on program exit. |
| 26 void EnsureNSPRInit(); | 30 void EnsureNSPRInit(); |
| 27 | 31 |
| 28 // Initialize NSS if it isn't already initialized. This must be called before | 32 // Initialize NSS if it isn't already initialized. This must be called before |
| 29 // any other NSS functions. This function is thread-safe, and NSS will only | 33 // any other NSS functions. This function is thread-safe, and NSS will only |
| 30 // ever be initialized once. NSS will be properly shut down on program exit. | 34 // ever be initialized once. NSS will be properly shut down on program exit. |
| 31 void EnsureNSSInit(); | 35 void EnsureNSSInit(); |
| 32 | 36 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 private: | 73 private: |
| 70 Lock *lock_; | 74 Lock *lock_; |
| 71 DISALLOW_COPY_AND_ASSIGN(AutoNSSWriteLock); | 75 DISALLOW_COPY_AND_ASSIGN(AutoNSSWriteLock); |
| 72 }; | 76 }; |
| 73 | 77 |
| 74 #endif // defined(USE_NSS) | 78 #endif // defined(USE_NSS) |
| 75 | 79 |
| 76 } // namespace base | 80 } // namespace base |
| 77 | 81 |
| 78 #endif // BASE_NSS_UTIL_H_ | 82 #endif // BASE_NSS_UTIL_H_ |
| OLD | NEW |