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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
6 | 6 |
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
8 | 8 |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 | 10 |
(...skipping 2673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2684 ResourceDispatcherHostImpl::HandleDownloadStarted( | 2684 ResourceDispatcherHostImpl::HandleDownloadStarted( |
2685 net::URLRequest* request, | 2685 net::URLRequest* request, |
2686 std::unique_ptr<ResourceHandler> handler, | 2686 std::unique_ptr<ResourceHandler> handler, |
2687 bool is_content_initiated, | 2687 bool is_content_initiated, |
2688 bool must_download) { | 2688 bool must_download) { |
2689 if (delegate()) { | 2689 if (delegate()) { |
2690 const ResourceRequestInfoImpl* request_info( | 2690 const ResourceRequestInfoImpl* request_info( |
2691 ResourceRequestInfoImpl::ForRequest(request)); | 2691 ResourceRequestInfoImpl::ForRequest(request)); |
2692 ScopedVector<ResourceThrottle> throttles; | 2692 ScopedVector<ResourceThrottle> throttles; |
2693 delegate()->DownloadStarting( | 2693 delegate()->DownloadStarting( |
2694 request, request_info->GetContext(), request_info->GetChildID(), | 2694 request, request_info->GetContext(), is_content_initiated, true, |
2695 request_info->GetRouteID(), is_content_initiated, true, &throttles); | 2695 &throttles); |
2696 if (!throttles.empty()) { | 2696 if (!throttles.empty()) { |
2697 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, | 2697 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, |
2698 std::move(throttles))); | 2698 std::move(throttles))); |
2699 } | 2699 } |
2700 } | 2700 } |
2701 return handler; | 2701 return handler; |
2702 } | 2702 } |
2703 | 2703 |
2704 } // namespace content | 2704 } // namespace content |
OLD | NEW |