| 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 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1587 if (delegate_) { | 1587 if (delegate_) { |
| 1588 delegate_->RequestBeginning(request, | 1588 delegate_->RequestBeginning(request, |
| 1589 resource_context, | 1589 resource_context, |
| 1590 appcache_service, | 1590 appcache_service, |
| 1591 resource_type, | 1591 resource_type, |
| 1592 &throttles); | 1592 &throttles); |
| 1593 } | 1593 } |
| 1594 | 1594 |
| 1595 if (request->has_upload()) { | 1595 if (request->has_upload()) { |
| 1596 // Block power save while uploading data. | 1596 // Block power save while uploading data. |
| 1597 throttles.push_back(new PowerSaveBlockResourceThrottle()); | 1597 throttles.push_back( |
| 1598 new PowerSaveBlockResourceThrottle(request->url().host())); |
| 1598 } | 1599 } |
| 1599 | 1600 |
| 1600 // TODO(ricea): Stop looking this up so much. | 1601 // TODO(ricea): Stop looking this up so much. |
| 1601 ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(request); | 1602 ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(request); |
| 1602 throttles.push_back(scheduler_->ScheduleRequest(child_id, route_id, | 1603 throttles.push_back(scheduler_->ScheduleRequest(child_id, route_id, |
| 1603 info->IsAsync(), request)); | 1604 info->IsAsync(), request)); |
| 1604 | 1605 |
| 1605 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, | 1606 handler.reset(new ThrottlingResourceHandler(std::move(handler), request, |
| 1606 std::move(throttles))); | 1607 std::move(throttles))); |
| 1607 | 1608 |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2533 load_flags |= net::LOAD_PREFETCH; | 2534 load_flags |= net::LOAD_PREFETCH; |
| 2534 } | 2535 } |
| 2535 | 2536 |
| 2536 if (is_sync_load) | 2537 if (is_sync_load) |
| 2537 load_flags |= net::LOAD_IGNORE_LIMITS; | 2538 load_flags |= net::LOAD_IGNORE_LIMITS; |
| 2538 | 2539 |
| 2539 return load_flags; | 2540 return load_flags; |
| 2540 } | 2541 } |
| 2541 | 2542 |
| 2542 } // namespace content | 2543 } // namespace content |
| OLD | NEW |