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

Unified Diff: chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.cc

Issue 2595033002: Update TaskTraits in easy_unlock_tpm_key_manager.cc. (Closed)
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.cc
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.cc
index 3e6443331be3ba411b6f416e67691e09d5e0a441..617a3be156fa6d7cdf52b27f5989e9b14d63fa60 100644
--- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.cc
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.cc
@@ -337,11 +337,10 @@ void EasyUnlockTpmKeyManager::CreateKeyInSystemSlot(
// but there should be at most one such task at a time.
get_tpm_slot_weak_ptr_factory_.InvalidateWeakPtrs();
- // This task interacts with the TPM, hence WithFileIO() and WithWait().
+ // This task interacts with the TPM, hence MayBlock().
base::PostTaskWithTraits(
- FROM_HERE,
- base::TaskTraits().WithFileIO().WithWait().WithShutdownBehavior(
- base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
+ FROM_HERE, base::TaskTraits().MayBlock().WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
base::Bind(&CreateTpmKeyPairOnWorkerThread, base::Passed(&system_slot),
public_key, base::ThreadTaskRunnerHandle::Get(),
base::Bind(&EasyUnlockTpmKeyManager::OnTpmKeyCreated,
@@ -355,11 +354,10 @@ void EasyUnlockTpmKeyManager::SignDataWithSystemSlot(
crypto::ScopedPK11Slot system_slot) {
CHECK(system_slot);
- // This task interacts with the TPM, hence WithFileIO() and WithWait().
+ // This task interacts with the TPM, hence MayBlock().
base::PostTaskWithTraits(
- FROM_HERE,
- base::TaskTraits().WithFileIO().WithWait().WithShutdownBehavior(
- base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
+ FROM_HERE, base::TaskTraits().MayBlock().WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
base::Bind(&SignDataOnWorkerThread, base::Passed(&system_slot),
public_key, data, base::ThreadTaskRunnerHandle::Get(),
base::Bind(&EasyUnlockTpmKeyManager::OnDataSigned,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698