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

Unified Diff: net/ssl/ssl_platform_key_mac.cc

Issue 1304143010: Plumbing SSLPrivateKey Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing unused function in Android. 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_mac.cc
diff --git a/net/ssl/ssl_platform_key_mac.cc b/net/ssl/ssl_platform_key_mac.cc
index 2f2974c47582208b96caf0e4c1554165268dc19b..45c895e0abd5ce906714fecdf28d5bcc62df85af 100644
--- a/net/ssl/ssl_platform_key_mac.cc
+++ b/net/ssl/ssl_platform_key_mac.cc
@@ -14,7 +14,6 @@
#include <Security/SecIdentity.h>
#include <Security/SecKey.h>
-#include "base/lazy_instance.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/mac/mac_logging.h"
@@ -29,6 +28,7 @@
#include "crypto/scoped_openssl_types.h"
#include "net/base/net_errors.h"
#include "net/cert/x509_certificate.h"
+#include "net/ssl/ssl_platform_key_task_runner.h"
#include "net/ssl/ssl_private_key.h"
#include "net/ssl/threaded_ssl_private_key.h"
@@ -212,9 +212,12 @@ class SSLPlatformKeyMac : public ThreadedSSLPrivateKey::Delegate {
} // namespace
-scoped_ptr<SSLPrivateKey> FetchClientCertPrivateKey(
- X509Certificate* certificate,
- scoped_refptr<base::SequencedTaskRunner> task_runner) {
+scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey(
+ X509Certificate* certificate) {
+ if (!certificate) {
+ return nullptr;
+ }
+
// Look up the private key.
base::ScopedCFTypeRef<SecKeyRef> private_key(
FetchSecKeyRefForCertificate(certificate));
@@ -231,9 +234,9 @@ scoped_ptr<SSLPrivateKey> FetchClientCertPrivateKey(
LOG(ERROR) << "Unknown key type: " << cssm_key->KeyHeader.AlgorithmId;
return nullptr;
}
- return make_scoped_ptr(new ThreadedSSLPrivateKey(
+ return make_scoped_refptr(new ThreadedSSLPrivateKey(
make_scoped_ptr(new SSLPlatformKeyMac(private_key.get(), cssm_key)),
- task_runner.Pass()));
+ GetSSLPlatformKeyTaskRunner()));
}
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698