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

Unified Diff: content/child/resource_dispatcher.cc

Issue 281073002: NOT FOR REVIEW: Adding prioritized incoming task queue to renderers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Prioritize input events Created 6 years, 7 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/content_child.gypi » ('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 d2acccd4b9fddcd4510948438e5defeefeb1b561..5b990e53f2a1bb0d14daf364bc88836269fcb3bc 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -15,6 +15,7 @@
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_util.h"
+#include "content/child/high_priority_resource_filter.h"
#include "content/child/request_extra_data.h"
#include "content/child/request_info.h"
#include "content/child/site_isolation_policy.h"
@@ -265,6 +266,7 @@ ResourceDispatcher::ResourceDispatcher(IPC::Sender* sender)
: message_sender_(sender),
weak_factory_(this),
delegate_(NULL),
+ high_priority_resource_filter_(NULL),
io_timestamp_(base::TimeTicks()) {
}
@@ -579,6 +581,8 @@ int ResourceDispatcher::AddPendingRequest(RequestPeer* callback,
frame_origin,
request_url,
download_to_file);
+ if (high_priority_resource_filter_)
+ high_priority_resource_filter_->AddPendingRequest(id, resource_type);
return id;
}
@@ -589,6 +593,9 @@ bool ResourceDispatcher::RemovePendingRequest(int request_id) {
PendingRequestInfo& request_info = it->second;
+ if (high_priority_resource_filter_)
+ high_priority_resource_filter_->RemovePendingRequest(request_id);
+
bool release_downloaded_file = request_info.download_to_file;
ReleaseResourcesInMessageQueue(&request_info.deferred_message_queue);
« no previous file with comments | « content/child/resource_dispatcher.h ('k') | content/content_child.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698