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

Unified Diff: net/ssl/ssl_platform_key_task_runner.cc

Issue 2103883004: Remove dependency of SSLPlatformKeyTaskRunner on single-threaded SequencedWorkerPool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a2_hook
Patch Set: fix fwd-decls Created 4 years, 5 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 | « net/ssl/ssl_platform_key_task_runner.h ('k') | net/ssl/threaded_ssl_private_key.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/ssl_platform_key_task_runner.cc
diff --git a/net/ssl/ssl_platform_key_task_runner.cc b/net/ssl/ssl_platform_key_task_runner.cc
index 7611d60454dccbef7f7ea8f1915e3c124511ebf8..2ef8469c15f263249dedfab8fd8d2186971717ae 100644
--- a/net/ssl/ssl_platform_key_task_runner.cc
+++ b/net/ssl/ssl_platform_key_task_runner.cc
@@ -2,29 +2,30 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/lazy_instance.h"
#include "net/ssl/ssl_platform_key_task_runner.h"
+#include "base/lazy_instance.h"
+
namespace net {
-SSLPlatformKeyTaskRunner::SSLPlatformKeyTaskRunner() {
- worker_pool_ = new base::SequencedWorkerPool(1, "Platform Key Thread");
- task_runner_ = worker_pool_->GetSequencedTaskRunnerWithShutdownBehavior(
- worker_pool_->GetSequenceToken(),
- base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN);
+SSLPlatformKeyTaskRunner::SSLPlatformKeyTaskRunner()
+ : worker_thread_("Platform Key Thread") {
+ base::Thread::Options options;
+ options.joinable = false;
+ worker_thread_.StartWithOptions(options);
}
-SSLPlatformKeyTaskRunner::~SSLPlatformKeyTaskRunner() {}
+SSLPlatformKeyTaskRunner::~SSLPlatformKeyTaskRunner() = default;
-scoped_refptr<base::SequencedTaskRunner>
+scoped_refptr<base::SingleThreadTaskRunner>
SSLPlatformKeyTaskRunner::task_runner() {
- return task_runner_;
+ return worker_thread_.task_runner();
}
base::LazyInstance<SSLPlatformKeyTaskRunner>::Leaky g_platform_key_task_runner =
LAZY_INSTANCE_INITIALIZER;
-scoped_refptr<base::SequencedTaskRunner> GetSSLPlatformKeyTaskRunner() {
+scoped_refptr<base::SingleThreadTaskRunner> GetSSLPlatformKeyTaskRunner() {
return g_platform_key_task_runner.Get().task_runner();
}
« no previous file with comments | « net/ssl/ssl_platform_key_task_runner.h ('k') | net/ssl/threaded_ssl_private_key.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698