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 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1045 is_continuation_of_transferred_request, | 1045 is_continuation_of_transferred_request, |
| 1046 &throttles); | 1046 &throttles); |
| 1047 } | 1047 } |
| 1048 | 1048 |
| 1049 if (request_data.resource_type == ResourceType::MAIN_FRAME) { | 1049 if (request_data.resource_type == ResourceType::MAIN_FRAME) { |
| 1050 throttles.insert( | 1050 throttles.insert( |
| 1051 throttles.begin(), | 1051 throttles.begin(), |
| 1052 new TransferNavigationResourceThrottle(request)); | 1052 new TransferNavigationResourceThrottle(request)); |
| 1053 } | 1053 } |
| 1054 | 1054 |
| 1055 if (!throttles.empty()) { | 1055 throttles.push_back(scheduler_.ScheduleRequest(child_id, route_id, |
|
darin (slow to review)
2013/01/14 22:03:30
nit: might read slightly better as:
throttles.p
James Simonsen
2013/01/15 01:10:06
Done.
| |
| 1056 handler.reset( | 1056 *request).release()); |
| 1057 new ThrottlingResourceHandler(handler.Pass(), child_id, request_id, | 1057 |
| 1058 throttles.Pass())); | 1058 handler.reset( |
| 1059 } | 1059 new ThrottlingResourceHandler(handler.Pass(), child_id, request_id, |
| 1060 throttles.Pass())); | |
| 1060 | 1061 |
| 1061 if (deferred_loader.get()) { | 1062 if (deferred_loader.get()) { |
| 1062 pending_loaders_[extra_info->GetGlobalRequestID()] = deferred_loader; | 1063 pending_loaders_[extra_info->GetGlobalRequestID()] = deferred_loader; |
| 1063 deferred_loader->CompleteTransfer(handler.Pass()); | 1064 deferred_loader->CompleteTransfer(handler.Pass()); |
| 1064 } else { | 1065 } else { |
| 1065 BeginRequestInternal(new_request.Pass(), handler.Pass()); | 1066 BeginRequestInternal(new_request.Pass(), handler.Pass()); |
| 1066 } | 1067 } |
| 1067 } | 1068 } |
| 1068 | 1069 |
| 1069 void ResourceDispatcherHostImpl::OnReleaseDownloadedFile(int request_id) { | 1070 void ResourceDispatcherHostImpl::OnReleaseDownloadedFile(int request_id) { |
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1722 | 1723 |
| 1723 return i->second.get(); | 1724 return i->second.get(); |
| 1724 } | 1725 } |
| 1725 | 1726 |
| 1726 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, | 1727 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, |
| 1727 int request_id) const { | 1728 int request_id) const { |
| 1728 return GetLoader(GlobalRequestID(child_id, request_id)); | 1729 return GetLoader(GlobalRequestID(child_id, request_id)); |
| 1729 } | 1730 } |
| 1730 | 1731 |
| 1731 } // namespace content | 1732 } // namespace content |
| OLD | NEW |