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.h" | 8 #include "base/message_loop.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "content/browser/child_process_security_policy_impl.h" | 10 #include "content/browser/child_process_security_policy_impl.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 response->head.was_fetched_via_spdy = response_info.was_fetched_via_spdy; | 47 response->head.was_fetched_via_spdy = response_info.was_fetched_via_spdy; |
48 response->head.was_npn_negotiated = response_info.was_npn_negotiated; | 48 response->head.was_npn_negotiated = response_info.was_npn_negotiated; |
49 response->head.npn_negotiated_protocol = | 49 response->head.npn_negotiated_protocol = |
50 response_info.npn_negotiated_protocol; | 50 response_info.npn_negotiated_protocol; |
51 response->head.was_fetched_via_proxy = request->was_fetched_via_proxy(); | 51 response->head.was_fetched_via_proxy = request->was_fetched_via_proxy(); |
52 response->head.socket_address = request->GetSocketAddress(); | 52 response->head.socket_address = request->GetSocketAddress(); |
53 appcache::AppCacheInterceptor::GetExtraResponseInfo( | 53 appcache::AppCacheInterceptor::GetExtraResponseInfo( |
54 request, | 54 request, |
55 &response->head.appcache_id, | 55 &response->head.appcache_id, |
56 &response->head.appcache_manifest_url); | 56 &response->head.appcache_manifest_url); |
| 57 // TODO(mmenke): Figure out if LOAD_ENABLE_LOAD_TIMING is safe to remove. |
| 58 if (request->load_flags() & net::LOAD_ENABLE_LOAD_TIMING) |
| 59 request->GetLoadTimingInfo(&response->head.load_timing); |
57 } | 60 } |
58 | 61 |
59 } // namespace | 62 } // namespace |
60 | 63 |
61 ResourceLoader::ResourceLoader(scoped_ptr<net::URLRequest> request, | 64 ResourceLoader::ResourceLoader(scoped_ptr<net::URLRequest> request, |
62 scoped_ptr<ResourceHandler> handler, | 65 scoped_ptr<ResourceHandler> handler, |
63 ResourceLoaderDelegate* delegate) | 66 ResourceLoaderDelegate* delegate) |
64 : weak_ptr_factory_(this) { | 67 : weak_ptr_factory_(this) { |
65 scoped_ptr<net::ClientCertStore> client_cert_store; | 68 scoped_ptr<net::ClientCertStore> client_cert_store; |
66 #if !defined(USE_OPENSSL) | 69 #if !defined(USE_OPENSSL) |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 // we resume. | 652 // we resume. |
650 deferred_stage_ = DEFERRED_FINISH; | 653 deferred_stage_ = DEFERRED_FINISH; |
651 } | 654 } |
652 } | 655 } |
653 | 656 |
654 void ResourceLoader::CallDidFinishLoading() { | 657 void ResourceLoader::CallDidFinishLoading() { |
655 delegate_->DidFinishLoading(this); | 658 delegate_->DidFinishLoading(this); |
656 } | 659 } |
657 | 660 |
658 } // namespace content | 661 } // namespace content |
OLD | NEW |