Index: crypto/nss_util.h |
diff --git a/crypto/nss_util.h b/crypto/nss_util.h |
index efc8140f37fe39fe46989d34d22919e6991fa554..4d3d3e29322ede21821d59f27281d7a2ffb1562a 100644 |
--- a/crypto/nss_util.h |
+++ b/crypto/nss_util.h |
@@ -7,6 +7,8 @@ |
#include <string> |
#include "base/basictypes.h" |
+#include "base/callback_forward.h" |
+#include "base/compiler_specific.h" |
#include "crypto/crypto_export.h" |
namespace base { |
@@ -102,11 +104,18 @@ CRYPTO_EXPORT void OpenPersistentNSSDB(); |
// GetPrivateNSSKeySlot() will return the TPM slot if one was found. |
CRYPTO_EXPORT void EnableTPMTokenForNSS(); |
+// Returns true if EnableTPMTokenForNSS has been called. |
+CRYPTO_EXPORT bool IsTPMTokenEnabledForNSS(); |
+ |
// Returns true if the TPM is owned and PKCS#11 initialized with the |
// user and security officer PINs, and has been enabled in NSS by |
// calling EnableTPMForNSS, and Chaps has been successfully |
// loaded into NSS. |
-CRYPTO_EXPORT bool IsTPMTokenReady(); |
+// If |callback| is non-null and the function returns false, the |callback| will |
+// be run once the TPM is ready. |callback| will never be run if the function |
+// returns true. |
+CRYPTO_EXPORT bool IsTPMTokenReady(const base::Closure& callback) |
+ WARN_UNUSED_RESULT; |
// Initialize the TPM token. Does nothing if it is already initialized. |
CRYPTO_EXPORT bool InitializeTPMToken(int token_slot_id); |