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

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

Issue 2833553002: Revert of [Prerender] Restore request priorities when swapped in (Closed)
Patch Set: Created 3 years, 8 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/browser/loader/resource_scheduler.h ('k') | content/public/browser/resource_dispatcher_host.h » ('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 d653c7246944fb8f084e2f3d9ee437e13ba22e9f..e1dcb0aa04ae1c3f52ee34e4c4ee2f09ced62df1 100644
--- a/content/browser/loader/resource_scheduler.cc
+++ b/content/browser/loader/resource_scheduler.cc
@@ -237,9 +237,8 @@
}
static ScheduledResourceRequest* ForRequest(net::URLRequest* request) {
- UnownedPointer* pointer =
- static_cast<UnownedPointer*>(request->GetUserData(kUserDataKey));
- return pointer ? pointer->get() : nullptr;
+ return static_cast<UnownedPointer*>(request->GetUserData(kUserDataKey))
+ ->get();
}
// Starts the request. If |start_mode| is START_ASYNC, the request will not
@@ -1081,17 +1080,6 @@
new_priority_params);
}
-void ResourceScheduler::ReprioritizeRequest(net::URLRequest* request,
- net::RequestPriority new_priority) {
- int current_intra_priority = 0;
- auto* existing_request = ScheduledResourceRequest::ForRequest(request);
- if (existing_request) {
- current_intra_priority =
- existing_request->get_request_priority_params().intra_priority;
- }
- ReprioritizeRequest(request, new_priority, current_intra_priority);
-}
-
ResourceScheduler::ClientId ResourceScheduler::MakeClientId(
int child_id, int route_id) {
return (static_cast<ResourceScheduler::ClientId>(child_id) << 32) | route_id;
« no previous file with comments | « content/browser/loader/resource_scheduler.h ('k') | content/public/browser/resource_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698