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

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

Issue 51683002: [Net] Assert that URLRequests with LOAD_IGNORE_LIMITS have MAXIMUM_PRIORITY (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 1 month 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/browser/loader/resource_dispatcher_host_impl.cc ('k') | net/ocsp/nss_ocsp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_scheduler.cc
diff --git a/content/browser/loader/resource_scheduler.cc b/content/browser/loader/resource_scheduler.cc
index d458936ecf1e29110a8a935fbcbcca3ad155f5a6..7d6f0f48117c36ba80146af91f577eb53800f773 100644
--- a/content/browser/loader/resource_scheduler.cc
+++ b/content/browser/loader/resource_scheduler.cc
@@ -273,6 +273,12 @@ void ResourceScheduler::StartRequest(ScheduledResourceRequest* request,
void ResourceScheduler::ReprioritizeRequest(ScheduledResourceRequest* request,
net::RequestPriority new_priority) {
+ if (request->url_request()->load_flags() & net::LOAD_IGNORE_LIMITS) {
+ // We should not be re-prioritizing requests with the
+ // IGNORE_LIMITS flag.
+ NOTREACHED();
+ return;
+ }
net::RequestPriority old_priority = request->url_request()->priority();
DCHECK_NE(new_priority, old_priority);
request->url_request()->SetPriority(new_priority);
@@ -290,7 +296,8 @@ void ResourceScheduler::ReprioritizeRequest(ScheduledResourceRequest* request,
}
client->pending_requests.Erase(request);
- client->pending_requests.Insert(request, request->url_request()->priority());
+ client->pending_requests.Insert(request,
+ request->url_request()->priority());
if (new_priority > old_priority) {
// Check if this request is now able to load at its new priority.
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | net/ocsp/nss_ocsp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698