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

Unified Diff: content/child/resource_dispatcher.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/child/resource_dispatcher.h
diff --git a/content/child/resource_dispatcher.h b/content/child/resource_dispatcher.h
index 420638058e31dad757d70219c6cd95c05b69f167..b3b25cc0dfd560bb9f97b5e0cd234b5d362b7b39 100644
--- a/content/child/resource_dispatcher.h
+++ b/content/child/resource_dispatcher.h
@@ -22,6 +22,7 @@
#include "base/single_thread_task_runner.h"
#include "base/time/time.h"
#include "content/common/content_export.h"
+#include "content/common/resource_priority_change_info.h"
#include "content/common/url_loader.mojom.h"
#include "content/public/common/resource_type.h"
#include "ipc/ipc_listener.h"
@@ -199,6 +200,12 @@ class CONTENT_EXPORT ResourceDispatcher : public IPC::Listener {
// May return NULL if the request as been canceled from the client side.
PendingRequestInfo* GetPendingRequestInfo(int request_id);
+ // Priority change requests often come in batches, so store them in a
+ // queue and send them as a batch.
+ std::vector<ResourcePriorityChangeInfo> queued_priority_requests;
+
+ void DispatchPendingPriorityRequests();
+
// Follows redirect, if any, for the given request.
void FollowPendingRedirect(int request_id, PendingRequestInfo* request_info);

Powered by Google App Engine
This is Rietveld 408576698