| 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 2443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2454 } | 2454 } |
| 2455 } | 2455 } |
| 2456 | 2456 |
| 2457 void ResourceDispatcherHostImpl::BlockRequestsForRoute( | 2457 void ResourceDispatcherHostImpl::BlockRequestsForRoute( |
| 2458 const GlobalFrameRoutingId& global_routing_id) { | 2458 const GlobalFrameRoutingId& global_routing_id) { |
| 2459 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 2459 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 2460 DCHECK(blocked_loaders_map_.find(global_routing_id) == | 2460 DCHECK(blocked_loaders_map_.find(global_routing_id) == |
| 2461 blocked_loaders_map_.end()) | 2461 blocked_loaders_map_.end()) |
| 2462 << "BlockRequestsForRoute called multiple time for the same RFH"; | 2462 << "BlockRequestsForRoute called multiple time for the same RFH"; |
| 2463 blocked_loaders_map_[global_routing_id] = | 2463 blocked_loaders_map_[global_routing_id] = |
| 2464 base::WrapUnique(new BlockedLoadersList()); | 2464 base::MakeUnique<BlockedLoadersList>(); |
| 2465 } | 2465 } |
| 2466 | 2466 |
| 2467 void ResourceDispatcherHostImpl::ResumeBlockedRequestsForRoute( | 2467 void ResourceDispatcherHostImpl::ResumeBlockedRequestsForRoute( |
| 2468 const GlobalFrameRoutingId& global_routing_id) { | 2468 const GlobalFrameRoutingId& global_routing_id) { |
| 2469 ProcessBlockedRequestsForRoute(global_routing_id, false); | 2469 ProcessBlockedRequestsForRoute(global_routing_id, false); |
| 2470 } | 2470 } |
| 2471 | 2471 |
| 2472 void ResourceDispatcherHostImpl::CancelBlockedRequestsForRoute( | 2472 void ResourceDispatcherHostImpl::CancelBlockedRequestsForRoute( |
| 2473 const GlobalFrameRoutingId& global_routing_id) { | 2473 const GlobalFrameRoutingId& global_routing_id) { |
| 2474 ProcessBlockedRequestsForRoute(global_routing_id, true); | 2474 ProcessBlockedRequestsForRoute(global_routing_id, true); |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2705 request_info->GetRouteID(), is_content_initiated, true, &throttles); | 2705 request_info->GetRouteID(), is_content_initiated, true, &throttles); |
| 2706 if (!throttles.empty()) { | 2706 if (!throttles.empty()) { |
| 2707 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, | 2707 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, |
| 2708 std::move(throttles))); | 2708 std::move(throttles))); |
| 2709 } | 2709 } |
| 2710 } | 2710 } |
| 2711 return handler; | 2711 return handler; |
| 2712 } | 2712 } |
| 2713 | 2713 |
| 2714 } // namespace content | 2714 } // namespace content |
| OLD | NEW |