Index: content/browser/loader/resource_loader.cc |
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc |
index b462a68d038aa69ba606ff06d2fd902ae829310b..7bb55f1a32dfba4d2aa0f8a02a9e595f2620dd39 100644 |
--- a/content/browser/loader/resource_loader.cc |
+++ b/content/browser/loader/resource_loader.cc |
@@ -311,8 +311,7 @@ void ResourceLoader::OnCertificateRequested( |
<< "OnCertificateRequested called with ssl_client_auth_handler pending"; |
ssl_client_auth_handler_.reset(new SSLClientAuthHandler( |
GetRequestInfo()->GetContext()->CreateClientCertStore(), request_.get(), |
- cert_info, base::Bind(&ResourceLoader::ContinueWithCertificate, |
- weak_ptr_factory_.GetWeakPtr()))); |
+ cert_info, this)); |
ssl_client_auth_handler_->SelectCertificate(); |
} |
@@ -503,6 +502,18 @@ void ResourceLoader::ContinueSSLRequest() { |
request_->ContinueDespiteLastError(); |
} |
+void ResourceLoader::ContinueWithCertificate(net::X509Certificate* cert) { |
+ DCHECK(ssl_client_auth_handler_); |
+ ssl_client_auth_handler_.reset(); |
+ request_->ContinueWithCertificate(cert); |
+} |
+ |
+void ResourceLoader::CancelCertificateSelection() { |
+ DCHECK(ssl_client_auth_handler_); |
+ ssl_client_auth_handler_.reset(); |
+ request_->CancelWithError(net::ERR_SSL_CLIENT_AUTH_CERT_NEEDED); |
+} |
+ |
void ResourceLoader::Resume() { |
DCHECK(!is_transferring_); |
@@ -851,9 +862,4 @@ void ResourceLoader::RecordHistograms() { |
} |
} |
-void ResourceLoader::ContinueWithCertificate(net::X509Certificate* cert) { |
- ssl_client_auth_handler_.reset(); |
- request_->ContinueWithCertificate(cert); |
-} |
- |
} // namespace content |