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

Unified Diff: chrome/browser/chromeos/net/client_cert_store_chromeos.cc

Issue 2533473002: Use TaskScheduler instead of WorkerPool in client_cert_store_chromeos.cc. (Closed)
Patch Set: add withfileio() 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 | chrome/browser/chromeos/net/client_cert_store_chromeos_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/net/client_cert_store_chromeos.cc
diff --git a/chrome/browser/chromeos/net/client_cert_store_chromeos.cc b/chrome/browser/chromeos/net/client_cert_store_chromeos.cc
index 7174c202c38c00a4fdb2430ae3fd565fadc383ad..e186d3bb9551cfa859735a801e668869b07a9174 100644
--- a/chrome/browser/chromeos/net/client_cert_store_chromeos.cc
+++ b/chrome/browser/chromeos/net/client_cert_store_chromeos.cc
@@ -12,7 +12,7 @@
#include "base/bind_helpers.h"
#include "base/callback.h"
#include "base/location.h"
-#include "base/threading/worker_pool.h"
+#include "base/task_scheduler/post_task.h"
#include "chrome/browser/chromeos/certificate_provider/certificate_provider.h"
#include "crypto/nss_crypto_module_delegate.h"
#include "net/ssl/ssl_cert_request_info.h"
@@ -81,18 +81,14 @@ void ClientCertStoreChromeOS::GotAdditionalCerts(
password_delegate.reset(
password_delegate_factory_.Run(request->host_and_port));
}
- if (base::WorkerPool::PostTaskAndReply(
- FROM_HERE,
- base::Bind(&ClientCertStoreChromeOS::GetAndFilterCertsOnWorkerThread,
- base::Unretained(this), base::Passed(&password_delegate),
- request, additional_certs, selected_certs),
- callback, true)) {
- return;
- }
- // If the task could not be posted, behave as if there were no certificates
- // which requires to clear |selected_certs|.
- selected_certs->clear();
- callback.Run();
+ base::PostTaskWithTraitsAndReply(
+ FROM_HERE,
+ base::TaskTraits().WithWait().WithFileIO().WithShutdownBehavior(
+ base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN),
+ base::Bind(&ClientCertStoreChromeOS::GetAndFilterCertsOnWorkerThread,
+ base::Unretained(this), base::Passed(&password_delegate),
+ request, additional_certs, selected_certs),
+ callback);
}
void ClientCertStoreChromeOS::GetAndFilterCertsOnWorkerThread(
« no previous file with comments | « no previous file | chrome/browser/chromeos/net/client_cert_store_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698