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

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

Issue 99533002: Disabled resource scheduling when using a SPDY proxy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved spdy proxy check to dispatcher as an explicit call when we start to get a response and added … Created 6 years, 11 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.cc
diff --git a/content/browser/loader/resource_scheduler.cc b/content/browser/loader/resource_scheduler.cc
index 4ae240e6fe3207c2bc0096024a61674d62e5e580..15c70270033dc8dbf563752b7aa50be12496b047 100644
--- a/content/browser/loader/resource_scheduler.cc
+++ b/content/browser/loader/resource_scheduler.cc
@@ -178,10 +178,11 @@ class ResourceScheduler::ScheduledResourceRequest
// Each client represents a tab.
struct ResourceScheduler::Client {
- Client() : has_body(false) {}
+ Client() : has_body(false), using_spdy_proxy(false) {}
~Client() {}
bool has_body;
+ bool using_spdy_proxy;
RequestQueue pending_requests;
RequestSet in_flight_requests;
};
@@ -305,9 +306,25 @@ void ResourceScheduler::OnWillInsertBody(int child_id, int route_id) {
}
Client* client = it->second;
- client->has_body = false;
- if (!client->has_body) {
- client->has_body = true;
+ client->has_body = true;
+ LoadAnyStartablePendingRequests(client);
+}
+
+void ResourceScheduler::OnReceivedSpdyProxiedHttpResponse(
+ int child_id,
+ int route_id) {
+ DCHECK(CalledOnValidThread());
+ ClientId client_id = MakeClientId(child_id, route_id);
+
+ ClientMap::iterator client_it = client_map_.find(client_id);
+ if (client_it == client_map_.end()) {
+ return;
+ }
+
+ Client* client = client_it->second;
+
+ if (!client->using_spdy_proxy) {
+ client->using_spdy_proxy = true;
LoadAnyStartablePendingRequests(client);
}
}
@@ -451,6 +468,10 @@ ResourceScheduler::ShouldStartReqResult ResourceScheduler::ShouldStartRequest(
return START_REQUEST;
}
+ if (client->using_spdy_proxy && url_request.url().SchemeIs("http")) {
+ return START_REQUEST;
+ }
+
const net::HttpServerProperties& http_server_properties =
*url_request.context()->http_server_properties();

Powered by Google App Engine
This is Rietveld 408576698