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(); |