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/profiler/scoped_tracker.h" | 10 #include "base/profiler/scoped_tracker.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "content/browser/appcache/appcache_interceptor.h" | 12 #include "content/browser/appcache/appcache_interceptor.h" |
13 #include "content/browser/child_process_security_policy_impl.h" | 13 #include "content/browser/child_process_security_policy_impl.h" |
14 #include "content/browser/loader/cross_site_resource_handler.h" | 14 #include "content/browser/loader/cross_site_resource_handler.h" |
15 #include "content/browser/loader/detachable_resource_handler.h" | 15 #include "content/browser/loader/detachable_resource_handler.h" |
16 #include "content/browser/loader/resource_loader_delegate.h" | 16 #include "content/browser/loader/resource_loader_delegate.h" |
17 #include "content/browser/loader/resource_request_info_impl.h" | 17 #include "content/browser/loader/resource_request_info_impl.h" |
18 #include "content/browser/service_worker/service_worker_request_handler.h" | 18 #include "content/browser/service_worker/service_worker_request_handler.h" |
19 #include "content/browser/ssl/ssl_client_auth_handler.h" | 19 #include "content/browser/ssl/ssl_client_auth_handler.h" |
20 #include "content/browser/ssl/ssl_manager.h" | 20 #include "content/browser/ssl/ssl_manager.h" |
21 #include "content/common/ssl_status_serialization.h" | 21 #include "content/common/ssl_status_serialization.h" |
| 22 #include "content/public/browser/browser_thread.h" |
22 #include "content/public/browser/cert_store.h" | 23 #include "content/public/browser/cert_store.h" |
23 #include "content/public/browser/resource_context.h" | 24 #include "content/public/browser/resource_context.h" |
24 #include "content/public/browser/resource_dispatcher_host_login_delegate.h" | 25 #include "content/public/browser/resource_dispatcher_host_login_delegate.h" |
25 #include "content/public/browser/signed_certificate_timestamp_store.h" | 26 #include "content/public/browser/signed_certificate_timestamp_store.h" |
26 #include "content/public/common/content_client.h" | 27 #include "content/public/common/content_client.h" |
27 #include "content/public/common/content_switches.h" | 28 #include "content/public/common/content_switches.h" |
28 #include "content/public/common/process_type.h" | 29 #include "content/public/common/process_type.h" |
29 #include "content/public/common/resource_response.h" | 30 #include "content/public/common/resource_response.h" |
30 #include "net/base/io_buffer.h" | 31 #include "net/base/io_buffer.h" |
31 #include "net/base/load_flags.h" | 32 #include "net/base/load_flags.h" |
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 case net::URLRequestStatus::FAILED: | 846 case net::URLRequestStatus::FAILED: |
846 status = STATUS_UNDEFINED; | 847 status = STATUS_UNDEFINED; |
847 break; | 848 break; |
848 } | 849 } |
849 | 850 |
850 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); | 851 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); |
851 } | 852 } |
852 } | 853 } |
853 | 854 |
854 void ResourceLoader::ContinueWithCertificate(net::X509Certificate* cert) { | 855 void ResourceLoader::ContinueWithCertificate(net::X509Certificate* cert) { |
855 ssl_client_auth_handler_.reset(); | 856 // Don't delete |ssl_client_auth_handler_| while it is still on the stack. |
| 857 BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, |
| 858 ssl_client_auth_handler_.release()); |
856 request_->ContinueWithCertificate(cert); | 859 request_->ContinueWithCertificate(cert); |
857 } | 860 } |
858 | 861 |
859 } // namespace content | 862 } // namespace content |
OLD | NEW |