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

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

Issue 755933002: Revert of "Remove SSLClientAuthHandler's RDH dependency." (https://codereview.chromium.org/59687300… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one other VLOG -> DVLOG conversion Created 6 years, 1 month 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 8c11b808682f9122471843a9104a72e6badc5878..0aa9ceee65bad8ab380f66e9ba04b604e949868f 100644
--- a/content/browser/loader/resource_loader.cc
+++ b/content/browser/loader/resource_loader.cc
@@ -97,7 +97,8 @@ ResourceLoader::ResourceLoader(scoped_ptr<net::URLRequest> request,
ResourceLoader::~ResourceLoader() {
if (login_delegate_.get())
login_delegate_->OnRequestCancelled();
- ssl_client_auth_handler_.reset();
+ if (ssl_client_auth_handler_.get())
+ ssl_client_auth_handler_->OnRequestCancelled();
// Run ResourceHandler destructor before we tear-down the rest of our state
// as the ResourceHandler may want to inspect the URLRequest and other state.
@@ -210,6 +211,10 @@ void ResourceLoader::ClearLoginDelegate() {
login_delegate_ = NULL;
}
+void ResourceLoader::ClearSSLClientAuthHandler() {
+ ssl_client_auth_handler_ = NULL;
+}
+
void ResourceLoader::OnUploadProgressACK() {
waiting_for_upload_progress_ack_ = false;
}
@@ -287,14 +292,12 @@ void ResourceLoader::OnCertificateRequested(
return;
}
- DCHECK(!ssl_client_auth_handler_)
+ DCHECK(!ssl_client_auth_handler_.get())
<< "OnCertificateRequested called with ssl_client_auth_handler pending";
- ssl_client_auth_handler_.reset(new SSLClientAuthHandler(
+ ssl_client_auth_handler_ = new SSLClientAuthHandler(
GetRequestInfo()->GetContext()->CreateClientCertStore(),
request_.get(),
- cert_info,
- base::Bind(&ResourceLoader::ContinueWithCertificate,
- weak_ptr_factory_.GetWeakPtr())));
+ cert_info);
ssl_client_auth_handler_->SelectCertificate();
}
@@ -526,7 +529,10 @@ void ResourceLoader::CancelRequestInternal(int error, bool from_renderer) {
login_delegate_->OnRequestCancelled();
login_delegate_ = NULL;
}
- ssl_client_auth_handler_.reset();
+ if (ssl_client_auth_handler_.get()) {
+ ssl_client_auth_handler_->OnRequestCancelled();
+ ssl_client_auth_handler_ = NULL;
+ }
request_->CancelWithError(error);
@@ -764,9 +770,4 @@ void ResourceLoader::RecordHistograms() {
}
}
-void ResourceLoader::ContinueWithCertificate(net::X509Certificate* cert) {
- ssl_client_auth_handler_.reset();
- request_->ContinueWithCertificate(cert);
-}
-
} // namespace content
« 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