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

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

Issue 2103883004: Remove dependency of SSLPlatformKeyTaskRunner on single-threaded SequencedWorkerPool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a2_hook
Patch Set: Clarify API further. Created 4 years, 5 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
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>
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 CHECK_EQ(must_free, TRUE); 349 CHECK_EQ(must_free, TRUE);
350 350
351 std::unique_ptr<ThreadedSSLPrivateKey::Delegate> delegate; 351 std::unique_ptr<ThreadedSSLPrivateKey::Delegate> delegate;
352 if (key_spec == CERT_NCRYPT_KEY_SPEC) { 352 if (key_spec == CERT_NCRYPT_KEY_SPEC) {
353 delegate.reset(new SSLPlatformKeyCNG(prov_or_key, key_type, max_length)); 353 delegate.reset(new SSLPlatformKeyCNG(prov_or_key, key_type, max_length));
354 } else { 354 } else {
355 DCHECK(SSLPrivateKey::Type::RSA == key_type); 355 DCHECK(SSLPrivateKey::Type::RSA == key_type);
356 delegate.reset(new SSLPlatformKeyCAPI(prov_or_key, key_spec, max_length)); 356 delegate.reset(new SSLPlatformKeyCAPI(prov_or_key, key_spec, max_length));
357 } 357 }
358 return make_scoped_refptr(new ThreadedSSLPrivateKey( 358 return make_scoped_refptr(new ThreadedSSLPrivateKey(
359 std::move(delegate), GetSSLPlatformKeyTaskRunner())); 359 std::move(delegate), SSLPlatformKeyTaskRunner::Get()));
360 } 360 }
361 361
362 } // namespace net 362 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698