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

Unified Diff: crypto/nss_util.h

Issue 53763003: Initialize per-ChromeOS-user NSS slots and provide the functions to access them. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix CertificateManagerBrowserTest Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | crypto/nss_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | crypto/nss_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698