OLD | NEW |
| (Empty) |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "net/ssl/ssl_platform_key_task_runner.h" | |
6 | |
7 #include "base/lazy_instance.h" | |
8 | |
9 namespace net { | |
10 | |
11 SSLPlatformKeyTaskRunner::SSLPlatformKeyTaskRunner() | |
12 : worker_thread_("Platform Key Thread") { | |
13 base::Thread::Options options; | |
14 options.joinable = false; | |
15 worker_thread_.StartWithOptions(options); | |
16 } | |
17 | |
18 SSLPlatformKeyTaskRunner::~SSLPlatformKeyTaskRunner() = default; | |
19 | |
20 scoped_refptr<base::SingleThreadTaskRunner> | |
21 SSLPlatformKeyTaskRunner::task_runner() { | |
22 return worker_thread_.task_runner(); | |
23 } | |
24 | |
25 base::LazyInstance<SSLPlatformKeyTaskRunner>::Leaky g_platform_key_task_runner = | |
26 LAZY_INSTANCE_INITIALIZER; | |
27 | |
28 scoped_refptr<base::SingleThreadTaskRunner> GetSSLPlatformKeyTaskRunner() { | |
29 return g_platform_key_task_runner.Get().task_runner(); | |
30 } | |
31 | |
32 } // namespace net | |
OLD | NEW |