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

Unified Diff: net/ssl/ssl_platform_key_task_runner.cc

Issue 1304143010: Plumbing SSLPrivateKey Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 3 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
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
new file mode 100644
index 0000000000000000000000000000000000000000..c1d86eea5cdb8349892073c6efc4b00146ea2b6b
--- /dev/null
+++ b/net/ssl/ssl_platform_key_task_runner.cc
@@ -0,0 +1,25 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
davidben 2015/09/25 20:10:12 Some of the older files still have the (c) sign, b
svaldez 2015/09/28 16:54:53 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/ssl/ssl_platform_key_task_runner.h"
+
+namespace net {
+
+SSLPlatformKeyTaskRunner::SSLPlatformKeyTaskRunner() {
+ // Serialize all the private key operations on a single background
+ // thread to avoid problems with buggy smartcards.
davidben 2015/09/25 20:10:12 I'd probably put a comment of this sort into the h
svaldez 2015/09/28 16:54:53 Done.
+ worker_pool_ = new base::SequencedWorkerPool(1, "Platform Key Thread");
+ task_runner_ = worker_pool_->GetSequencedTaskRunnerWithShutdownBehavior(
+ worker_pool_->GetSequenceToken(),
+ base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN);
+}
+
+SSLPlatformKeyTaskRunner::~SSLPlatformKeyTaskRunner() {}
+
+scoped_refptr<base::SequencedTaskRunner>
+SSLPlatformKeyTaskRunner::task_runner() {
+ return task_runner_;
+}
+
+} // namespace net

Powered by Google App Engine
This is Rietveld 408576698