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

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: Review fixes Created 7 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
« no previous file with comments | « no previous file | content/browser/loader/resource_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3c417cb9025268e374fb6ab46fadd54b8a112805 100644
--- a/content/browser/loader/resource_scheduler.h
+++ b/content/browser/loader/resource_scheduler.h
@@ -17,6 +17,7 @@
#include "net/base/request_priority.h"
namespace net {
+class HostPortPair;
class URLRequest;
}
@@ -107,12 +108,22 @@ 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,
James Simonsen 2013/11/14 19:22:44 These need to be indented 4 spaces. They're a line
oystein (OOO til 10th of July) 2013/11/14 19:51:50 Done.
+ const net::HostPortPair& active_request_host,
+ size_t* total_delayable,
+ size_t* total_for_active_host) const;
+
+ enum ShouldStartReqResult {
+ DO_NOT_START_REQUEST__STOP_SEARCHING = -2,
+ DO_NOT_START_REQUEST__KEEP_SEARCHING = -1,
+ START_REQUEST = 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698