| Index: content/browser/loader/resource_dispatcher_host_impl.h
|
| diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h
|
| index 3f5aa959c691d7b6d091ec99a4a24a06c1ffc08a..181b84222c1ef4e92a614ac5ca0e399354eb59f2 100644
|
| --- a/content/browser/loader/resource_dispatcher_host_impl.h
|
| +++ b/content/browser/loader/resource_dispatcher_host_impl.h
|
| @@ -513,6 +513,10 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
|
| // Checks all pending requests and updates the load info if necessary.
|
| void UpdateLoadInfo();
|
|
|
| + // Records statistics about outstanding requests since the last call, and
|
| + // reset the stats.
|
| + void RecordOutstandingRequestsStats();
|
| +
|
| // Resumes or cancels (if |cancel_requests| is true) any blocked requests.
|
| void ProcessBlockedRequestsForRoute(
|
| const GlobalFrameRoutingId& global_routing_id,
|
| @@ -695,6 +699,10 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
|
| bool must_download,
|
| bool is_new_request);
|
|
|
| + // Returns true if there are two or more processes that are not network
|
| + // 2-quiet (i.e. have at least three outstanding requests).
|
| + bool HasRequestsFromMultipleActiveProcesses();
|
| +
|
| LoaderMap pending_loaders_;
|
|
|
| // Collection of temp files downloaded for child processes via
|
| @@ -710,6 +718,10 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
|
| // not empty and at least one RenderViewHost is loading.
|
| std::unique_ptr<base::RepeatingTimer> update_load_states_timer_;
|
|
|
| + // A timer that periodically calls RecordOutstandingRequestsStats.
|
| + std::unique_ptr<base::RepeatingTimer>
|
| + record_outstanding_requests_stats_timer_;
|
| +
|
| // Request ID for browser initiated requests. request_ids generated by
|
| // child processes are counted up from 0, while browser created requests
|
| // start at -2 and go down from there. (We need to start at -2 because -1 is
|
| @@ -763,6 +775,15 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
|
| // Largest number of outstanding requests seen so far in any single process.
|
| int largest_outstanding_request_per_process_count_seen_;
|
|
|
| + // Largest number of outstanding requests seen since the last call to
|
| + // RecordOutstandingRequestsStats.
|
| + int peak_outstanding_request_count_;
|
| +
|
| + // Largest number of outstanding requests seen while there are outstanding
|
| + // requests from two or more processes, since the last call to
|
| + // RecordOutstandingRequestsStats.
|
| + int peak_outstanding_request_count_multitab_ = 0;
|
| +
|
| // Time of the last user gesture. Stored so that we can add a load
|
| // flag to requests occurring soon after a gesture to indicate they
|
| // may be because of explicit user action.
|
|
|