Chromium Code Reviews| 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..b042594d3a384cc5791f206b78f3a8f974d755fa 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,15 @@ 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() |
| + .WithPriority(base::TaskPriority::BACKGROUND) |
|
mattm
2016/11/29 21:48:46
This should probably be USER_BLOCKING, or at least
fdoray
2016/12/02 19:20:06
I removed the explicit priority. The task's priori
|
| + .WithShutdownBehavior( |
| + base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN), |
|
mattm
2016/11/29 21:48:46
CONTINUE_ON_SHUTDOWN is fine.
fdoray
2016/12/02 19:20:06
Acknowledged.
|
| + base::Bind(&ClientCertStoreChromeOS::GetAndFilterCertsOnWorkerThread, |
| + base::Unretained(this), base::Passed(&password_delegate), |
| + request, additional_certs, selected_certs), |
| + callback); |
| } |
| void ClientCertStoreChromeOS::GetAndFilterCertsOnWorkerThread( |