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

Side by Side Diff: net/ssl/ssl_platform_key_chromecast.cc

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « net/ssl/ssl_platform_key_android.cc ('k') | net/ssl/ssl_platform_key_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/ssl/ssl_platform_key.h"
6
7 #include <keyhi.h> 5 #include <keyhi.h>
6 #include <openssl/rsa.h>
8 #include <pk11pub.h> 7 #include <pk11pub.h>
9 #include <prerror.h> 8 #include <prerror.h>
10 9
11 #include <openssl/rsa.h>
12
13 #include "base/logging.h" 10 #include "base/logging.h"
14 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ptr_util.h"
15 #include "base/sequenced_task_runner.h" 13 #include "base/sequenced_task_runner.h"
16 #include "crypto/scoped_nss_types.h" 14 #include "crypto/scoped_nss_types.h"
17 #include "crypto/scoped_openssl_types.h" 15 #include "crypto/scoped_openssl_types.h"
18 #include "net/cert/x509_certificate.h" 16 #include "net/cert/x509_certificate.h"
19 #include "net/ssl/client_key_store.h" 17 #include "net/ssl/client_key_store.h"
18 #include "net/ssl/ssl_platform_key.h"
20 #include "net/ssl/ssl_platform_key_task_runner.h" 19 #include "net/ssl/ssl_platform_key_task_runner.h"
21 #include "net/ssl/ssl_private_key.h" 20 #include "net/ssl/ssl_private_key.h"
22 #include "net/ssl/threaded_ssl_private_key.h" 21 #include "net/ssl/threaded_ssl_private_key.h"
23 22
24 namespace net { 23 namespace net {
25 24
26 namespace { 25 namespace {
27 26
28 void LogPRError() { 27 void LogPRError() {
29 PRErrorCode err = PR_GetError(); 28 PRErrorCode err = PR_GetError();
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey( 121 scoped_refptr<SSLPrivateKey> FetchClientCertPrivateKey(
123 X509Certificate* certificate) { 122 X509Certificate* certificate) {
124 crypto::ScopedSECKEYPrivateKey key( 123 crypto::ScopedSECKEYPrivateKey key(
125 PK11_FindKeyByAnyCert(certificate->os_cert_handle(), nullptr)); 124 PK11_FindKeyByAnyCert(certificate->os_cert_handle(), nullptr));
126 if (!key) { 125 if (!key) {
127 return ClientKeyStore::GetInstance()->FetchClientCertPrivateKey( 126 return ClientKeyStore::GetInstance()->FetchClientCertPrivateKey(
128 *certificate); 127 *certificate);
129 } 128 }
130 129
131 return make_scoped_refptr(new ThreadedSSLPrivateKey( 130 return make_scoped_refptr(new ThreadedSSLPrivateKey(
132 make_scoped_ptr(new SSLPlatformKeyChromecast(std::move(key))), 131 base::WrapUnique(new SSLPlatformKeyChromecast(std::move(key))),
133 GetSSLPlatformKeyTaskRunner())); 132 GetSSLPlatformKeyTaskRunner()));
134 } 133 }
135 134
136 } // namespace net 135 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/ssl_platform_key_android.cc ('k') | net/ssl/ssl_platform_key_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698