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

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

Issue 23620058: Add a cap of six in-flight requests per host to the ResourceScheduler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed build Created 7 years, 2 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 d9711134421c71273abead5be7807bddee68940c..6bbdf784852d82a0ec082a0ac9cf3235d983cde0 100644
--- a/content/browser/loader/resource_scheduler.h
+++ b/content/browser/loader/resource_scheduler.h
@@ -18,6 +18,7 @@
namespace net {
class URLRequest;
+class HostPortPair;
James Simonsen 2013/11/13 01:26:23 Alphabetize.
oystein (OOO til 10th of July) 2013/11/14 00:19:07 Done.
}
namespace content {
@@ -107,12 +108,21 @@ class CONTENT_EXPORT ResourceScheduler : public base::NonThreadSafe {
// Returns the number of requests with priority < LOW that are currently in
// flight.
- size_t GetNumDelayableRequestsInFlight(Client* client) const;
+ void GetNumDelayableRequestsInFlight(Client* client,
+ net::HostPortPair* active_request_host,
+ size_t* total_delayable,
+ size_t* total_for_active_host) const;
+
+ enum ShouldStartReqResult {
+ kDoNotStartRequest_StopSearching = -2,
James Simonsen 2013/11/13 01:26:23 Is this proper style now? net/ uses all caps for e
oystein (OOO til 10th of July) 2013/11/14 00:19:07 Changed; but this seems super inconsistent right n
James Simonsen 2013/11/14 19:22:43 I don't have a preference. We should just follow w
oystein (OOO til 10th of July) 2013/11/14 19:51:49 Done.
+ kDoNotStartRequest_KeepSearching = -1,
+ kStartRequest = 1,
+ };
// Returns true if the request should start. This is the core scheduling
// algorithm.
- bool ShouldStartRequest(ScheduledResourceRequest* request,
- Client* client) const;
+ ShouldStartReqResult ShouldStartRequest(ScheduledResourceRequest* request,
+ Client* client) const;
// Returns the client ID for the given |child_id| and |route_id| combo.
ClientId MakeClientId(int child_id, int route_id);
« 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