| Index: content/browser/loader/resource_scheduler.h
|
| diff --git a/content/browser/loader/resource_scheduler.h b/content/browser/loader/resource_scheduler.h
|
| index b44eb7710bd65048cdbca1905b8bbed0b1ae9870..f4067fe35ccf3a1b1346d587c88326ae22a40b45 100644
|
| --- a/content/browser/loader/resource_scheduler.h
|
| +++ b/content/browser/loader/resource_scheduler.h
|
| @@ -151,6 +151,15 @@ class CONTENT_EXPORT ResourceScheduler : public base::NonThreadSafe {
|
| bool IsClientVisibleForTesting(int child_id, int route_id);
|
|
|
| private:
|
| + enum ClientState {
|
| + // Observable client.
|
| + ACTIVE,
|
| + // Non-observable client.
|
| + BACKGROUND,
|
| + // No client found.
|
| + UNKNOWN,
|
| + };
|
| +
|
| class RequestQueue;
|
| class ScheduledResourceRequest;
|
| struct RequestPriorityParams;
|
| @@ -188,6 +197,10 @@ class CONTENT_EXPORT ResourceScheduler : public base::NonThreadSafe {
|
|
|
| size_t CountCoalescedClients() const;
|
|
|
| + // Returns UNKNOWN if the corresponding client is not found, else returns
|
| + // whether the client is ACTIVE (user-observable) or BACKGROUND.
|
| + ClientState GetClientState(ClientId client_id) const;
|
| +
|
| // Update the queue position for |request|, possibly causing it to start
|
| // loading.
|
| //
|
| @@ -204,6 +217,10 @@ class CONTENT_EXPORT ResourceScheduler : public base::NonThreadSafe {
|
| // Returns the client for the given |child_id| and |route_id| combo.
|
| Client* GetClient(int child_id, int route_id);
|
|
|
| + void PostHistogram(const char* base_name,
|
| + const char* suffix,
|
| + base::TimeDelta time);
|
| +
|
| bool should_coalesce_;
|
| bool should_throttle_;
|
| ClientMap client_map_;
|
|
|