| 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 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 filter_->appcache_service(), | 1015 filter_->appcache_service(), |
| 1016 request_data.resource_type, | 1016 request_data.resource_type, |
| 1017 child_id, | 1017 child_id, |
| 1018 route_id, | 1018 route_id, |
| 1019 is_continuation_of_transferred_request, | 1019 is_continuation_of_transferred_request, |
| 1020 &throttles); | 1020 &throttles); |
| 1021 } | 1021 } |
| 1022 | 1022 |
| 1023 if (request->has_upload()) { | 1023 if (request->has_upload()) { |
| 1024 // Block power save while uploading data. | 1024 // Block power save while uploading data. |
| 1025 throttles.push_back(new PowerSaveBlockResourceThrottle("Uploading data.")); | 1025 throttles.push_back(new PowerSaveBlockResourceThrottle()); |
| 1026 } | 1026 } |
| 1027 | 1027 |
| 1028 if (request_data.resource_type == ResourceType::MAIN_FRAME) { | 1028 if (request_data.resource_type == ResourceType::MAIN_FRAME) { |
| 1029 throttles.insert( | 1029 throttles.insert( |
| 1030 throttles.begin(), | 1030 throttles.begin(), |
| 1031 new TransferNavigationResourceThrottle(request)); | 1031 new TransferNavigationResourceThrottle(request)); |
| 1032 } | 1032 } |
| 1033 | 1033 |
| 1034 if (!throttles.empty()) { | 1034 if (!throttles.empty()) { |
| 1035 handler.reset( | 1035 handler.reset( |
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1701 | 1701 |
| 1702 return i->second.get(); | 1702 return i->second.get(); |
| 1703 } | 1703 } |
| 1704 | 1704 |
| 1705 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, | 1705 ResourceLoader* ResourceDispatcherHostImpl::GetLoader(int child_id, |
| 1706 int request_id) const { | 1706 int request_id) const { |
| 1707 return GetLoader(GlobalRequestID(child_id, request_id)); | 1707 return GetLoader(GlobalRequestID(child_id, request_id)); |
| 1708 } | 1708 } |
| 1709 | 1709 |
| 1710 } // namespace content | 1710 } // namespace content |
| OLD | NEW |