Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1024)

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 11270027: Add a ResourceScheduler to ResourceDispatcherHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Win build Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/resource_dispatcher_host_impl.cc
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
index fd945c744a5fe8c85659d748a10017c1eab5d4b0..d53f002f576096f8ecf0ac85ff8c7b395a79576e 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
@@ -1052,11 +1052,12 @@ void ResourceDispatcherHostImpl::BeginRequest(
new TransferNavigationResourceThrottle(request));
}
- if (!throttles.empty()) {
- handler.reset(
- new ThrottlingResourceHandler(handler.Pass(), child_id, request_id,
- throttles.Pass()));
- }
+ 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.
+ *request).release());
+
+ handler.reset(
+ new ThrottlingResourceHandler(handler.Pass(), child_id, request_id,
+ throttles.Pass()));
if (deferred_loader.get()) {
pending_loaders_[extra_info->GetGlobalRequestID()] = deferred_loader;

Powered by Google App Engine
This is Rietveld 408576698