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

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

Issue 1230133005: Fix Resource Priorities and Scheduling (Chrome Side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes from review feedback Created 5 years, 4 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.h
diff --git a/content/browser/loader/resource_scheduler.h b/content/browser/loader/resource_scheduler.h
index 60cf0cd69f8c10360b3c3f43babb2a61744e7443..7ed98ad00aca86e4b63ab156c7f061655c89f34e 100644
--- a/content/browser/loader/resource_scheduler.h
+++ b/content/browser/loader/resource_scheduler.h
@@ -165,6 +165,41 @@ class CONTENT_EXPORT ResourceScheduler : public base::NonThreadSafe {
return outstanding_request_limit_;
}
+ // Returns the priority level above which resources are considered
+ // layout-blocking if the html_body has not started. It is also the threshold
+ // below which resources are considered delayable (and for completeness,
+ // a request that matches the threshold level is a high-priority but not
+ // layout-blocking request).
mmenke 2015/08/13 15:16:07 That's actually not true - "in_flight_layout_block
Pat Meenan 2015/08/13 20:56:42 Thanks - managed to confuse myself apparently. Ch
+ net::RequestPriority layout_blocking_or_high_priority_threshold() const {
+ return layout_blocking_or_high_priority_threshold_;
+ }
+
+ // Returns true if all delayable requests should be blocked while at least
+ // in_flight_layout_blocking_threshold() layout-blocking requests are
+ // in-flight during the layout-blocking phase of loading.
+ bool enable_in_flight_layout_blocking_threshold() const {
+ return enable_in_flight_layout_blocking_threshold_;
+ }
+
+ // Returns the number of in-flight layout-blocking requests above which
+ // all delayable requests should be blocked when
+ // enable_layout_blocking_threshold is set.
+ size_t in_flight_layout_blocking_threshold() const {
+ return in_flight_layout_blocking_threshold_;
+ }
+
+ // Returns the maximum number of delayable requests to allow be in-flight
+ // at any point in time while in the layout-blocking phase of loading.
+ size_t max_num_delayable_while_layout_blocking() const {
+ return max_num_delayable_while_layout_blocking_;
+ }
+
+ // Returns the maximum number of delayable requests to all be in-flight at
+ // any point in time (across all hosts).
+ size_t max_num_delayable_requests() const {
+ return max_num_delayable_requests_;
+ }
+
enum ClientState {
// Observable client.
ACTIVE,
@@ -238,6 +273,11 @@ class CONTENT_EXPORT ResourceScheduler : public base::NonThreadSafe {
size_t coalesced_clients_;
bool limit_outstanding_requests_;
size_t outstanding_request_limit_;
+ net::RequestPriority layout_blocking_or_high_priority_threshold_;
+ bool enable_in_flight_layout_blocking_threshold_;
+ size_t in_flight_layout_blocking_threshold_;
+ size_t max_num_delayable_while_layout_blocking_;
+ size_t max_num_delayable_requests_;
// This is a repeating timer to initiate requests on COALESCED Clients.
scoped_ptr<base::Timer> coalescing_timer_;
RequestSet unowned_requests_;

Powered by Google App Engine
This is Rietveld 408576698