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/location.h" | 8 #include "base/location.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/profiler/scoped_tracker.h" | 10 #include "base/profiler/scoped_tracker.h" |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 ssl_client_auth_handler_->SelectCertificate(); | 307 ssl_client_auth_handler_->SelectCertificate(); |
308 } | 308 } |
309 | 309 |
310 void ResourceLoader::OnSSLCertificateError(net::URLRequest* request, | 310 void ResourceLoader::OnSSLCertificateError(net::URLRequest* request, |
311 const net::SSLInfo& ssl_info, | 311 const net::SSLInfo& ssl_info, |
312 bool fatal) { | 312 bool fatal) { |
313 ResourceRequestInfoImpl* info = GetRequestInfo(); | 313 ResourceRequestInfoImpl* info = GetRequestInfo(); |
314 | 314 |
315 SSLManager::OnSSLCertificateError( | 315 SSLManager::OnSSLCertificateError( |
316 weak_ptr_factory_.GetWeakPtr(), info->GetResourceType(), request_->url(), | 316 weak_ptr_factory_.GetWeakPtr(), info->GetResourceType(), request_->url(), |
317 info->GetWebContentsForRequest(), ssl_info, fatal); | 317 info->GetWebContentsGetterForRequest(), ssl_info, fatal); |
318 } | 318 } |
319 | 319 |
320 void ResourceLoader::OnBeforeNetworkStart(net::URLRequest* unused, | 320 void ResourceLoader::OnBeforeNetworkStart(net::URLRequest* unused, |
321 bool* defer) { | 321 bool* defer) { |
322 DCHECK_EQ(request_.get(), unused); | 322 DCHECK_EQ(request_.get(), unused); |
323 | 323 |
324 // Give the handler a chance to delay the URLRequest from using the network. | 324 // Give the handler a chance to delay the URLRequest from using the network. |
325 if (!handler_->OnBeforeNetworkStart(request_->url(), defer)) { | 325 if (!handler_->OnBeforeNetworkStart(request_->url(), defer)) { |
326 Cancel(); | 326 Cancel(); |
327 return; | 327 return; |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 case net::URLRequestStatus::FAILED: | 705 case net::URLRequestStatus::FAILED: |
706 status = STATUS_UNDEFINED; | 706 status = STATUS_UNDEFINED; |
707 break; | 707 break; |
708 } | 708 } |
709 | 709 |
710 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); | 710 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); |
711 } | 711 } |
712 } | 712 } |
713 | 713 |
714 } // namespace content | 714 } // namespace content |
OLD | NEW |