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

Side by Side Diff: net/ssl/ssl_platform_key_nss.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_mac.cc ('k') | net/ssl/ssl_platform_key_win.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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>
8 #include <openssl/bn.h> 6 #include <openssl/bn.h>
9 #include <openssl/ecdsa.h> 7 #include <openssl/ecdsa.h>
10 #include <openssl/rsa.h> 8 #include <openssl/rsa.h>
11 #include <pk11pub.h> 9 #include <pk11pub.h>
12 #include <prerror.h> 10 #include <prerror.h>
11
13 #include <utility> 12 #include <utility>
14 13
15 #include "base/logging.h" 14 #include "base/logging.h"
16 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ptr_util.h"
17 #include "base/sequenced_task_runner.h" 17 #include "base/sequenced_task_runner.h"
18 #include "crypto/scoped_nss_types.h" 18 #include "crypto/scoped_nss_types.h"
19 #include "crypto/scoped_openssl_types.h" 19 #include "crypto/scoped_openssl_types.h"
20 #include "net/cert/x509_certificate.h" 20 #include "net/cert/x509_certificate.h"
21 #include "net/ssl/client_key_store.h" 21 #include "net/ssl/client_key_store.h"
22 #include "net/ssl/ssl_platform_key.h"
22 #include "net/ssl/ssl_platform_key_task_runner.h" 23 #include "net/ssl/ssl_platform_key_task_runner.h"
23 #include "net/ssl/ssl_private_key.h" 24 #include "net/ssl/ssl_private_key.h"
24 #include "net/ssl/threaded_ssl_private_key.h" 25 #include "net/ssl/threaded_ssl_private_key.h"
25 26
26 namespace net { 27 namespace net {
27 28
28 namespace { 29 namespace {
29 30
30 void LogPRError() { 31 void LogPRError() {
31 PRErrorCode err = PR_GetError(); 32 PRErrorCode err = PR_GetError();
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 type = SSLPrivateKey::Type::RSA; 176 type = SSLPrivateKey::Type::RSA;
176 break; 177 break;
177 case ecKey: 178 case ecKey:
178 type = SSLPrivateKey::Type::ECDSA; 179 type = SSLPrivateKey::Type::ECDSA;
179 break; 180 break;
180 default: 181 default:
181 LOG(ERROR) << "Unknown key type: " << nss_type; 182 LOG(ERROR) << "Unknown key type: " << nss_type;
182 return nullptr; 183 return nullptr;
183 } 184 }
184 return make_scoped_refptr(new ThreadedSSLPrivateKey( 185 return make_scoped_refptr(new ThreadedSSLPrivateKey(
185 make_scoped_ptr(new SSLPlatformKeyNSS(type, std::move(key))), 186 base::WrapUnique(new SSLPlatformKeyNSS(type, std::move(key))),
186 GetSSLPlatformKeyTaskRunner())); 187 GetSSLPlatformKeyTaskRunner()));
187 } 188 }
188 189
189 } // namespace net 190 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/ssl_platform_key_mac.cc ('k') | net/ssl/ssl_platform_key_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698