Index: content/browser/loader/resource_loader.cc |
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc |
index f1157bda985870c34ecd16abec8e5ca19a02e335..adfa8b24667b51ab817b18866e7ac36f7c2f0295 100644 |
--- a/content/browser/loader/resource_loader.cc |
+++ b/content/browser/loader/resource_loader.cc |
@@ -316,8 +316,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(); |
} |
@@ -508,6 +507,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_); |
@@ -856,9 +867,4 @@ void ResourceLoader::RecordHistograms() { |
} |
} |
-void ResourceLoader::ContinueWithCertificate(net::X509Certificate* cert) { |
- ssl_client_auth_handler_.reset(); |
- request_->ContinueWithCertificate(cert); |
-} |
- |
} // namespace content |