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

Unified Diff: chrome/browser/chromeos/platform_keys/platform_keys_nss.cc

Issue 2595903002: Update TaskTraits in platform_keys_nss.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/platform_keys/platform_keys_nss.cc
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc b/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc
index bb10f16f06626baded58aa35038b64ebc54273d0..755e86c43b45e97ffa3f42c295443b92f93887e9 100644
--- a/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc
+++ b/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc
@@ -441,11 +441,10 @@ void GenerateRSAKeyWithDB(std::unique_ptr<GenerateRSAKeyState> state,
net::NSSCertDatabase* cert_db) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
// Only the slot and not the NSSCertDatabase is required. Ignore |cert_db|.
- // 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()
+ .MayBlock()
.WithPriority(base::TaskPriority::BACKGROUND)
.WithShutdownBehavior(
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
@@ -538,11 +537,10 @@ void SignRSAWithDB(std::unique_ptr<SignRSAState> state,
net::NSSCertDatabase* cert_db) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
// Only the slot and not the NSSCertDatabase is required. Ignore |cert_db|.
- // 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()
+ .MayBlock()
.WithPriority(base::TaskPriority::BACKGROUND)
.WithShutdownBehavior(
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
@@ -609,11 +607,10 @@ void DidGetCertificates(std::unique_ptr<GetCertificatesState> state,
std::unique_ptr<net::CertificateList> all_certs) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
state->certs_ = std::move(all_certs);
- // 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()
+ .MayBlock()
.WithPriority(base::TaskPriority::BACKGROUND)
.WithShutdownBehavior(
base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
« 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