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 3 // found in the LICENSE file. 4 5 #ifndef BASE_NSS_UTIL_H_ 6 #define BASE_NSS_UTIL_H_ 7 8 #include "base/basictypes.h" 9 10 namespace base { 11 12 class Time; 13 14 // Initialize NRPR if it isn't already initialized. This function is 15 // thread-safe, and NSPR will only ever be initialized once. NSPR will be 16 // properly shut down on program exit. 17 void EnsureNSPRInit(); 18 19 // Initialize NSS if it isn't already initialized. This must be called before 20 // any other NSS functions. This function is thread-safe, and NSS will only 21 // ever be initialized once. NSS will be properly shut down on program exit. 22 void EnsureNSSInit(); 23 24 // Convert a NSS PRTime value into a base::Time object. 25 // We use a int64 instead of PRTime here to avoid depending on NSPR headers. 26 Time PRTimeToBaseTime(int64 prtime); 27 28 } // namespace base 29 30 #endif // BASE_NSS_UTIL_H_ 31