Chromium Code Reviews| 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..8185f8e38c00d2cd3ae1b05e78d754911e38363c 100644 |
| --- a/content/browser/loader/resource_scheduler.h |
| +++ b/content/browser/loader/resource_scheduler.h |
| @@ -165,6 +165,38 @@ class CONTENT_EXPORT ResourceScheduler : public base::NonThreadSafe { |
| return outstanding_request_limit_; |
| } |
| + // Returns the priority level above which resources are considered |
| + // layout-blocking. |
|
mmenke
2015/08/12 17:30:08
Suggesting adding something like "or high priority
Pat Meenan
2015/08/13 12:11:03
Done.
|
| + net::RequestPriority layout_blocking_priority_threshold() const { |
|
mmenke
2015/08/12 17:30:08
layout_blocking_or_high_priority_threshold (And sa
Pat Meenan
2015/08/13 12:11:03
Makes sense for this one but the others are really
|
| + return layout_blocking_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_layout_blocking_threshold() const { |
| + return enable_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 +270,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_priority_threshold_; |
| + bool enable_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_; |