OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/loader/resource_loader.h" | 5 #include "content/browser/loader/resource_loader.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "content/browser/child_process_security_policy_impl.h" | 9 #include "content/browser/child_process_security_policy_impl.h" |
10 #include "content/browser/loader/doomed_resource_handler.h" | 10 #include "content/browser/loader/doomed_resource_handler.h" |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 void ResourceLoader::OnCertificateRequested( | 257 void ResourceLoader::OnCertificateRequested( |
258 net::URLRequest* unused, | 258 net::URLRequest* unused, |
259 net::SSLCertRequestInfo* cert_info) { | 259 net::SSLCertRequestInfo* cert_info) { |
260 DCHECK_EQ(request_.get(), unused); | 260 DCHECK_EQ(request_.get(), unused); |
261 | 261 |
262 if (!delegate_->AcceptSSLClientCertificateRequest(this, cert_info)) { | 262 if (!delegate_->AcceptSSLClientCertificateRequest(this, cert_info)) { |
263 request_->Cancel(); | 263 request_->Cancel(); |
264 return; | 264 return; |
265 } | 265 } |
266 | 266 |
267 if (cert_info->client_certs.empty()) { | 267 if (!cert_info->no_client_certs && cert_info->client_certs.empty()) { |
268 // No need to query the user if there are no certs to choose from. | 268 // No need to query the user if there are no certs to choose from. |
269 request_->ContinueWithCertificate(NULL); | 269 request_->ContinueWithCertificate(NULL); |
270 return; | 270 return; |
271 } | 271 } |
272 | 272 |
273 DCHECK(!ssl_client_auth_handler_) << | 273 DCHECK(!ssl_client_auth_handler_) << |
274 "OnCertificateRequested called with ssl_client_auth_handler pending"; | 274 "OnCertificateRequested called with ssl_client_auth_handler pending"; |
275 ssl_client_auth_handler_ = new SSLClientAuthHandler(request_.get(), | 275 ssl_client_auth_handler_ = new SSLClientAuthHandler(request_.get(), |
276 cert_info); | 276 cert_info); |
277 ssl_client_auth_handler_->SelectCertificate(); | 277 ssl_client_auth_handler_->SelectCertificate(); |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 // we resume. | 573 // we resume. |
574 deferred_stage_ = DEFERRED_FINISH; | 574 deferred_stage_ = DEFERRED_FINISH; |
575 } | 575 } |
576 } | 576 } |
577 | 577 |
578 void ResourceLoader::CallDidFinishLoading() { | 578 void ResourceLoader::CallDidFinishLoading() { |
579 delegate_->DidFinishLoading(this); | 579 delegate_->DidFinishLoading(this); |
580 } | 580 } |
581 | 581 |
582 } // namespace content | 582 } // namespace content |
OLD | NEW |