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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 DCHECK_EQ(request_.get(), unused); | 263 DCHECK_EQ(request_.get(), unused); |
264 | 264 |
265 if (!delegate_->AcceptSSLClientCertificateRequest(this, cert_info)) { | 265 if (!delegate_->AcceptSSLClientCertificateRequest(this, cert_info)) { |
266 request_->Cancel(); | 266 request_->Cancel(); |
267 return; | 267 return; |
268 } | 268 } |
269 | 269 |
270 DCHECK(!ssl_client_auth_handler_.get()) | 270 DCHECK(!ssl_client_auth_handler_.get()) |
271 << "OnCertificateRequested called with ssl_client_auth_handler pending"; | 271 << "OnCertificateRequested called with ssl_client_auth_handler pending"; |
272 ssl_client_auth_handler_ = new SSLClientAuthHandler( | 272 ssl_client_auth_handler_ = new SSLClientAuthHandler( |
273 GetRequestInfo()->GetContext()->CreateClientCertStore(), | 273 GetRequestInfo()->GetContext()->CreateClientCertStore( |
| 274 cert_info->host_and_port), |
274 request_.get(), | 275 request_.get(), |
275 cert_info); | 276 cert_info); |
276 ssl_client_auth_handler_->SelectCertificate(); | 277 ssl_client_auth_handler_->SelectCertificate(); |
277 } | 278 } |
278 | 279 |
279 void ResourceLoader::OnSSLCertificateError(net::URLRequest* request, | 280 void ResourceLoader::OnSSLCertificateError(net::URLRequest* request, |
280 const net::SSLInfo& ssl_info, | 281 const net::SSLInfo& ssl_info, |
281 bool fatal) { | 282 bool fatal) { |
282 ResourceRequestInfoImpl* info = GetRequestInfo(); | 283 ResourceRequestInfoImpl* info = GetRequestInfo(); |
283 | 284 |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 case net::URLRequestStatus::FAILED: | 640 case net::URLRequestStatus::FAILED: |
640 status = STATUS_UNDEFINED; | 641 status = STATUS_UNDEFINED; |
641 break; | 642 break; |
642 } | 643 } |
643 | 644 |
644 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); | 645 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); |
645 } | 646 } |
646 } | 647 } |
647 | 648 |
648 } // namespace content | 649 } // namespace content |
OLD | NEW |