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

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

Issue 692723002: Add histograms to gather ResourceScheduler information. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing for histograms.xml file. Created 6 years, 1 month 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 b44eb7710bd65048cdbca1905b8bbed0b1ae9870..2b8d7373b4f2c92f20ee194a182e4680a413cb25 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.
//
« no previous file with comments | « no previous file | content/browser/loader/resource_scheduler.cc » ('j') | content/browser/loader/resource_scheduler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698