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

Unified Diff: content/child/resource_dispatcher.cc

Issue 1402103002: Revert of Revert "Post loading tasks on the appropriate WebFrameScheduler's queue." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « content/child/resource_dispatcher.h ('k') | content/child/resource_scheduling_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/resource_dispatcher.cc
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index 684f3eecf22cc3c0cf30ac6e96fbc3918d9da0ec..0c9907215c61c63f909bcfedd3c2ad5a1788b634 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -18,6 +18,7 @@
#include "base/strings/string_util.h"
#include "content/child/request_extra_data.h"
#include "content/child/request_info.h"
+#include "content/child/resource_scheduling_filter.h"
#include "content/child/shared_memory_received_data_factory.h"
#include "content/child/site_isolation_stats_gatherer.h"
#include "content/child/sync_load_response.h"
@@ -413,6 +414,9 @@
message_sender_->Send(
new ResourceHostMsg_ReleaseDownloadedFile(request_id));
}
+
+ if (resource_scheduling_filter_.get())
+ resource_scheduling_filter_->ClearRequestIdTaskRunner(request_id);
return true;
}
@@ -598,6 +602,13 @@
frame_origin,
request->url,
request_info.download_to_file);
+
+ if (resource_scheduling_filter_.get() &&
+ request_info.loading_web_task_runner) {
+ resource_scheduling_filter_->SetRequestIdTaskRunner(
+ request_id,
+ make_scoped_ptr(request_info.loading_web_task_runner->clone()));
+ }
message_sender_->Send(new ResourceHostMsg_RequestResource(
request_info.routing_id, request_id, *request));
@@ -805,4 +816,9 @@
return request.Pass();
}
+void ResourceDispatcher::SetResourceSchedulingFilter(
+ scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) {
+ resource_scheduling_filter_ = resource_scheduling_filter;
+}
+
} // namespace content
« no previous file with comments | « content/child/resource_dispatcher.h ('k') | content/child/resource_scheduling_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698