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

Unified Diff: crypto/nss_util.h

Issue 202483002: Merge 253942 "chromeos: Load chaps module and lookup TPM slots o..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1847/src/
Patch Set: Created 6 years, 9 months 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 | « chromeos/tpm_token_loader.cc ('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
===================================================================
--- crypto/nss_util.h (revision 257483)
+++ crypto/nss_util.h (working copy)
@@ -7,7 +7,7 @@
#include <string>
#include "base/basictypes.h"
-#include "base/callback_forward.h"
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/files/scoped_temp_dir.h"
#include "crypto/crypto_export.h"
@@ -118,8 +118,14 @@
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);
+// Initialize the TPM token. The |callback| will run on the same thread with
+// true if the token and slot were successfully loaded or were already
+// initialized. |callback| will be passed false if loading failed.
+// Once called, InitializeTPMToken must not be called again until the |callback|
+// has been run.
+CRYPTO_EXPORT void InitializeTPMToken(
+ int token_slot_id,
+ const base::Callback<void(bool)>& callback);
// Exposed for unittests only.
class CRYPTO_EXPORT_PRIVATE ScopedTestNSSChromeOSUser {
« no previous file with comments | « chromeos/tpm_token_loader.cc ('k') | crypto/nss_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698