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

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

Issue 2259823002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 unified diff | Download patch
« no previous file with comments | « net/ssl/ssl_platform_key_mac.cc ('k') | net/ssl/test_ssl_private_key.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 <keyhi.h> 5 #include <keyhi.h>
6 #include <openssl/bn.h> 6 #include <openssl/bn.h>
7 #include <openssl/ecdsa.h> 7 #include <openssl/ecdsa.h>
8 #include <openssl/rsa.h> 8 #include <openssl/rsa.h>
9 #include <pk11pub.h> 9 #include <pk11pub.h>
10 #include <prerror.h> 10 #include <prerror.h>
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 type = SSLPrivateKey::Type::RSA; 176 type = SSLPrivateKey::Type::RSA;
177 break; 177 break;
178 case ecKey: 178 case ecKey:
179 type = SSLPrivateKey::Type::ECDSA; 179 type = SSLPrivateKey::Type::ECDSA;
180 break; 180 break;
181 default: 181 default:
182 LOG(ERROR) << "Unknown key type: " << nss_type; 182 LOG(ERROR) << "Unknown key type: " << nss_type;
183 return nullptr; 183 return nullptr;
184 } 184 }
185 return make_scoped_refptr(new ThreadedSSLPrivateKey( 185 return make_scoped_refptr(new ThreadedSSLPrivateKey(
186 base::WrapUnique(new SSLPlatformKeyNSS(type, std::move(key))), 186 base::MakeUnique<SSLPlatformKeyNSS>(type, std::move(key)),
187 GetSSLPlatformKeyTaskRunner())); 187 GetSSLPlatformKeyTaskRunner()));
188 } 188 }
189 189
190 } // namespace net 190 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/ssl_platform_key_mac.cc ('k') | net/ssl/test_ssl_private_key.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698