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 #ifndef NET_SSL_SSL_PLATFORM_KEY_TASK_RUNNER_H_ |
| 6 #define NET_SSL_SSL_PLATFORM_KEY_TASK_RUNNER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/threading/sequenced_worker_pool.h" |
| 10 |
| 11 namespace net { |
| 12 |
| 13 // Serialize all the private key operations on a single background |
| 14 // thread to avoid problems with buggy smartcards. |
| 15 class SSLPlatformKeyTaskRunner { |
| 16 public: |
| 17 SSLPlatformKeyTaskRunner(); |
| 18 ~SSLPlatformKeyTaskRunner(); |
| 19 |
| 20 scoped_refptr<base::SequencedTaskRunner> task_runner(); |
| 21 |
| 22 private: |
| 23 scoped_refptr<base::SequencedWorkerPool> worker_pool_; |
| 24 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
| 25 |
| 26 DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeyTaskRunner); |
| 27 }; |
| 28 |
| 29 scoped_refptr<base::SequencedTaskRunner> GetSSLPlatformKeyTaskRunner(); |
| 30 |
| 31 } // namespace net |
| 32 |
| 33 #endif // NET_SSL_SSL_PLATFORM_KEY_TASK_RUNNER_H_ |
OLD | NEW |