Index: net/ssl/ssl_platform_key_task_runner.h |
diff --git a/net/ssl/ssl_platform_key_task_runner.h b/net/ssl/ssl_platform_key_task_runner.h |
index 0c9b124f1fa3f891ae15f6f0c38d30aee0e45b85..7abf3241cb3fcceb2f4fdfdd373cfe4969fa6bca 100644 |
--- a/net/ssl/ssl_platform_key_task_runner.h |
+++ b/net/ssl/ssl_platform_key_task_runner.h |
@@ -6,28 +6,33 @@ |
#define NET_SSL_SSL_PLATFORM_KEY_TASK_RUNNER_H_ |
#include "base/macros.h" |
-#include "base/threading/sequenced_worker_pool.h" |
+#include "base/memory/ref_counted.h" |
+#include "base/threading/thread.h" |
+ |
+namespace { |
+class SequencedTaskRunner; |
+} |
namespace net { |
-// Serialize all the private key operations on a single background |
-// thread to avoid problems with buggy smartcards. |
+// Serialize all the private key operations on a single background thread to |
+// avoid problems with buggy smartcards. The exposed SingleThreadTaskRunner has |
+// CONTINUE_ON_SHUTDOWN semantics. |
Ryan Sleevi
2016/07/01 01:09:30
Simply from reading this header, it's unclear what
gab
2016/07/05 15:40:42
The only definitions are on SequencedWorkerPool an
Ryan Sleevi
2016/07/06 18:57:07
While I agree people should be familiar with //bas
gab
2016/07/07 23:51:34
Makes sense, thanks
|
class SSLPlatformKeyTaskRunner { |
public: |
SSLPlatformKeyTaskRunner(); |
- ~SSLPlatformKeyTaskRunner(); |
- scoped_refptr<base::SequencedTaskRunner> task_runner(); |
+ // Ensure the instance is leaked to enforce CONTINUE_ON_SHUTDOWN semantics. |
+ ~SSLPlatformKeyTaskRunner() = delete; |
+ |
+ static scoped_refptr<base::SingleThreadTaskRunner> Get(); |
Ryan Sleevi
2016/07/01 01:09:30
DESIGN: From a design perspective, it should be an
gab
2016/07/05 15:40:42
I thought it was even weirder to have essentially
Ryan Sleevi
2016/07/06 18:57:06
Why? The two are very different statements about A
gab
2016/07/07 23:51:34
Done.
|
private: |
- scoped_refptr<base::SequencedWorkerPool> worker_pool_; |
- scoped_refptr<base::SequencedTaskRunner> task_runner_; |
+ base::Thread worker_thread_; |
Ryan Sleevi
2016/07/01 01:09:30
Have you tested and run Chrome with this? With DCH
gab
2016/07/05 15:40:42
Yep, runs fine in a Debug build on Win10 corp:
-
Ryan Sleevi
2016/07/06 18:57:06
Well, no, the ::Leaky doesn't address the concerns
gab
2016/07/07 23:51:34
Ah got it, makes sense. Well there doesn't appear
gab
2016/07/07 23:54:16
On that note though, it would probably be better t
|
DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeyTaskRunner); |
}; |
-scoped_refptr<base::SequencedTaskRunner> GetSSLPlatformKeyTaskRunner(); |
- |
} // namespace net |
#endif // NET_SSL_SSL_PLATFORM_KEY_TASK_RUNNER_H_ |