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 |