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

Unified Diff: content/browser/loader/resource_loader.cc

Issue 2898573002: Refactor client cert private key handling. (Closed)
Patch Set: removed no longer needed forward declaration Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/loader/resource_loader.h ('k') | content/browser/loader/resource_loader_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_loader.cc
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc
index 61562815dd409b7c94b2cab0862a20fee6bee2df..270dbadf9ccbc2d0c411c5397a440b5327f17118 100644
--- a/content/browser/loader/resource_loader.cc
+++ b/content/browser/loader/resource_loader.cc
@@ -37,8 +37,6 @@
#include "net/nqe/effective_connection_type.h"
#include "net/nqe/network_quality_estimator.h"
#include "net/ssl/client_cert_store.h"
-#include "net/ssl/ssl_platform_key.h"
-#include "net/ssl/ssl_private_key.h"
#include "net/url_request/redirect_info.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_status.h"
@@ -469,16 +467,12 @@ void ResourceLoader::ContinueSSLRequest() {
request_->ContinueDespiteLastError();
}
-void ResourceLoader::ContinueWithCertificate(net::X509Certificate* cert) {
+void ResourceLoader::ContinueWithCertificate(
+ scoped_refptr<net::X509Certificate> cert,
+ scoped_refptr<net::SSLPrivateKey> private_key) {
DCHECK(ssl_client_auth_handler_);
ssl_client_auth_handler_.reset();
- if (!cert) {
- request_->ContinueWithCertificate(nullptr, nullptr);
- return;
- }
- scoped_refptr<net::SSLPrivateKey> private_key =
- net::FetchClientCertPrivateKey(cert);
- request_->ContinueWithCertificate(cert, private_key.get());
+ request_->ContinueWithCertificate(std::move(cert), std::move(private_key));
}
void ResourceLoader::CancelCertificateSelection() {
« no previous file with comments | « content/browser/loader/resource_loader.h ('k') | content/browser/loader/resource_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698