Chromium Code Reviews| 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 <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1043 is_continuation_of_transferred_request, | 1043 is_continuation_of_transferred_request, |
| 1044 &throttles); | 1044 &throttles); |
| 1045 } | 1045 } |
| 1046 | 1046 |
| 1047 if (request_data.resource_type == ResourceType::MAIN_FRAME) { | 1047 if (request_data.resource_type == ResourceType::MAIN_FRAME) { |
| 1048 throttles.insert( | 1048 throttles.insert( |
| 1049 throttles.begin(), | 1049 throttles.begin(), |
| 1050 new TransferNavigationResourceThrottle(request)); | 1050 new TransferNavigationResourceThrottle(request)); |
| 1051 } | 1051 } |
| 1052 | 1052 |
| 1053 throttles.push_back(scheduler_.ScheduleRequest(child_id, route_id, | |
| 1054 *request).release()); | |
| 1055 | |
| 1053 if (!throttles.empty()) { | 1056 if (!throttles.empty()) { |
|
darin (slow to review)
2012/12/18 21:09:56
nit: You can delete this line now.
James Simonsen
2013/01/10 19:47:53
Done.
| |
| 1054 handler.reset( | 1057 handler.reset( |
| 1055 new ThrottlingResourceHandler(handler.Pass(), child_id, request_id, | 1058 new ThrottlingResourceHandler(handler.Pass(), child_id, request_id, |
| 1056 throttles.Pass())); | 1059 throttles.Pass())); |
| 1057 } | 1060 } |
| 1058 | 1061 |
| 1059 if (deferred_loader.get()) { | 1062 if (deferred_loader.get()) { |
| 1060 pending_loaders_[extra_info->GetGlobalRequestID()] = deferred_loader; | 1063 pending_loaders_[extra_info->GetGlobalRequestID()] = deferred_loader; |
| 1061 deferred_loader->CompleteTransfer(handler.Pass()); | 1064 deferred_loader->CompleteTransfer(handler.Pass()); |
| 1062 } else { | 1065 } else { |
| 1063 BeginRequestInternal(new_request.Pass(), handler.Pass()); | 1066 BeginRequestInternal(new_request.Pass(), handler.Pass()); |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1720 | 1723 |
| 1721 return i->second.get(); | 1724 return i->second.get(); |
| 1722 } | 1725 } |
| 1723 | 1726 |
| 1724 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, | 1727 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, |
| 1725 int request_id) const { | 1728 int request_id) const { |
| 1726 return GetLoader(GlobalRequestID(child_id, request_id)); | 1729 return GetLoader(GlobalRequestID(child_id, request_id)); |
| 1727 } | 1730 } |
| 1728 | 1731 |
| 1729 } // namespace content | 1732 } // namespace content |
| OLD | NEW |