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

Unified Diff: chromeos/tpm_token_loader.cc

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 | « no previous file | crypto/nss_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/tpm_token_loader.cc
===================================================================
--- chromeos/tpm_token_loader.cc (revision 257483)
+++ chromeos/tpm_token_loader.cc (working copy)
@@ -48,6 +48,12 @@
crypto::EnableTPMTokenForNSS();
}
+void PostResultToTaskRunner(scoped_refptr<base::SequencedTaskRunner> runner,
+ const base::Callback<void(bool)>& callback,
+ bool success) {
+ runner->PostTask(FROM_HERE, base::Bind(callback, success));
+}
+
} // namespace
static TPMTokenLoader* g_tpm_token_loader = NULL;
@@ -197,12 +203,15 @@
return;
}
case TPM_TOKEN_INFO_RECEIVED: {
- base::PostTaskAndReplyWithResult(
- crypto_task_runner_.get(),
+ crypto_task_runner_->PostTask(
FROM_HERE,
- base::Bind(&crypto::InitializeTPMToken, tpm_token_slot_id_),
- base::Bind(&TPMTokenLoader::OnTPMTokenInitialized,
- weak_factory_.GetWeakPtr()));
+ base::Bind(
+ &crypto::InitializeTPMToken,
+ tpm_token_slot_id_,
+ base::Bind(&PostResultToTaskRunner,
+ base::MessageLoopProxy::current(),
+ base::Bind(&TPMTokenLoader::OnTPMTokenInitialized,
+ weak_factory_.GetWeakPtr()))));
return;
}
case TPM_TOKEN_INITIALIZED: {
« no previous file with comments | « no previous file | crypto/nss_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698