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

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

Issue 1752233002: Convert Pass()→std::move() on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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/socket/tcp_socket_win.cc ('k') | printing/backend/win_helper.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" 5 #include "net/ssl/ssl_platform_key.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <NCrypt.h> 8 #include <NCrypt.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
11 #include <string> 11 #include <string>
12 #include <utility>
12 #include <vector> 13 #include <vector>
13 14
14 #include <openssl/bn.h> 15 #include <openssl/bn.h>
15 #include <openssl/ecdsa.h> 16 #include <openssl/ecdsa.h>
16 #include <openssl/evp.h> 17 #include <openssl/evp.h>
17 #include <openssl/x509.h> 18 #include <openssl/x509.h>
18 19
19 #include "base/lazy_instance.h" 20 #include "base/lazy_instance.h"
20 #include "base/logging.h" 21 #include "base/logging.h"
21 #include "base/macros.h" 22 #include "base/macros.h"
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 CHECK_EQ(must_free, TRUE); 352 CHECK_EQ(must_free, TRUE);
352 353
353 scoped_ptr<ThreadedSSLPrivateKey::Delegate> delegate; 354 scoped_ptr<ThreadedSSLPrivateKey::Delegate> delegate;
354 if (key_spec == CERT_NCRYPT_KEY_SPEC) { 355 if (key_spec == CERT_NCRYPT_KEY_SPEC) {
355 delegate.reset(new SSLPlatformKeyCNG(prov_or_key, key_type, max_length)); 356 delegate.reset(new SSLPlatformKeyCNG(prov_or_key, key_type, max_length));
356 } else { 357 } else {
357 DCHECK(SSLPrivateKey::Type::RSA == key_type); 358 DCHECK(SSLPrivateKey::Type::RSA == key_type);
358 delegate.reset(new SSLPlatformKeyCAPI(prov_or_key, key_spec, max_length)); 359 delegate.reset(new SSLPlatformKeyCAPI(prov_or_key, key_spec, max_length));
359 } 360 }
360 return make_scoped_refptr(new ThreadedSSLPrivateKey( 361 return make_scoped_refptr(new ThreadedSSLPrivateKey(
361 delegate.Pass(), GetSSLPlatformKeyTaskRunner())); 362 std::move(delegate), GetSSLPlatformKeyTaskRunner()));
362 } 363 }
363 364
364 } // namespace net 365 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/tcp_socket_win.cc ('k') | printing/backend/win_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698