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

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

Issue 2552703003: Make reprioritization IPC batch rather than per-request.
Patch Set: Fix some typos. Created 4 years 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.h
diff --git a/content/browser/loader/resource_scheduler.h b/content/browser/loader/resource_scheduler.h
index 76b455c409fd5cd87f3764b72dce42d7f48abf6d..53c8c4614a842e4559878d64e5ae4dc48d7c68b8 100644
--- a/content/browser/loader/resource_scheduler.h
+++ b/content/browser/loader/resource_scheduler.h
@@ -54,6 +54,12 @@ class ResourceThrottle;
// the URLRequest.
class CONTENT_EXPORT ResourceScheduler : public base::NonThreadSafe {
public:
+ struct PriorityChangeRequest {
+ net::URLRequest* request;
+ net::RequestPriority priority;
+ int intra_priority;
+ };
+
ResourceScheduler();
~ResourceScheduler();
@@ -103,6 +109,11 @@ class CONTENT_EXPORT ResourceScheduler : public base::NonThreadSafe {
net::RequestPriority new_priority,
int intra_priority_value);
+ // Update the priority for a set of requests. Modifies request->priority()
+ // and may start the request loading if it wasn't already started.
+ void ReprioritizeRequests(
+ const std::vector<PriorityChangeRequest>& change_requests);
+
private:
// Returns the maximum number of delayable requests to all be in-flight at
// any point in time (across all hosts).

Powered by Google App Engine
This is Rietveld 408576698