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

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: Created 7 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
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..b3cddf12107ca60fa9286b66ca3516439fa1477c 100644
--- a/content/browser/loader/resource_scheduler.cc
+++ b/content/browser/loader/resource_scheduler.cc
@@ -174,7 +174,7 @@ scoped_ptr<ResourceThrottle> ResourceScheduler::ScheduleRequest(
if (ShouldStartRequest(request.get(), client)) {
StartRequest(request.get(), client);
} else {
- client->pending_requests.Insert(request.get(), url_request->priority());
+ client->pending_requests.Insert(request.get(), url_request->GetPriority());
}
return request.PassAs<ResourceThrottle>();
}
@@ -273,7 +273,7 @@ void ResourceScheduler::StartRequest(ScheduledResourceRequest* request,
void ResourceScheduler::ReprioritizeRequest(ScheduledResourceRequest* request,
net::RequestPriority new_priority) {
- net::RequestPriority old_priority = request->url_request()->priority();
+ net::RequestPriority old_priority = request->url_request()->GetPriority();
DCHECK_NE(new_priority, old_priority);
request->url_request()->SetPriority(new_priority);
ClientMap::iterator client_it = client_map_.find(request->client_id());
@@ -290,7 +290,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()->GetPriority());
if (new_priority > old_priority) {
// Check if this request is now able to load at its new priority.
@@ -315,7 +316,7 @@ size_t ResourceScheduler::GetNumDelayableRequestsInFlight(
size_t count = 0;
for (RequestSet::iterator it = client->in_flight_requests.begin();
it != client->in_flight_requests.end(); ++it) {
- if ((*it)->url_request()->priority() < net::LOW) {
+ if ((*it)->url_request()->GetPriority() < net::LOW) {
const net::HttpServerProperties& http_server_properties =
*(*it)->url_request()->context()->http_server_properties();
if (!http_server_properties.SupportsSpdy(
@@ -364,7 +365,7 @@ bool ResourceScheduler::ShouldStartRequest(ScheduledResourceRequest* request,
bool origin_supports_spdy = http_server_properties.SupportsSpdy(
net::HostPortPair::FromURL(url_request.url()));
- if (url_request.priority() >= net::LOW ||
+ if (url_request.GetPriority() >= net::LOW ||
!ResourceRequestInfo::ForRequest(&url_request)->IsAsync() ||
origin_supports_spdy) {
return true;

Powered by Google App Engine
This is Rietveld 408576698