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

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: Created 7 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_scheduler.cc
diff --git a/content/browser/loader/resource_scheduler.cc b/content/browser/loader/resource_scheduler.cc
index d458936ecf1e29110a8a935fbcbcca3ad155f5a6..776610b222f27a6f623f4e6e3a98db3d5fc2a05f 100644
--- a/content/browser/loader/resource_scheduler.cc
+++ b/content/browser/loader/resource_scheduler.cc
@@ -134,10 +134,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;
};
@@ -193,6 +194,15 @@ void ResourceScheduler::RemoveRequest(ScheduledResourceRequest* request) {
Client* client = client_it->second;
+ if (!client->using_spdy_proxy) {
+ net::HttpResponseInfo response_info =
+ request->url_request()->response_info();
+ if (response_info.was_fetched_via_spdy &&
+ response_info.was_fetched_via_proxy) {
James Simonsen 2013/12/02 18:59:31 Is this really the only way to determine it? It se
Pat Meenan 2013/12/02 19:35:51 This is the lowest-impact way I could come up with
+ client->using_spdy_proxy = true;
+ }
+ }
+
if (client->pending_requests.IsQueued(request)) {
client->pending_requests.Erase(request);
DCHECK(!ContainsKey(client->in_flight_requests, request));
@@ -245,6 +255,7 @@ void ResourceScheduler::OnNavigate(int child_id, int route_id) {
Client* client = it->second;
client->has_body = false;
+ client->using_spdy_proxy = false;
}
void ResourceScheduler::OnWillInsertBody(int child_id, int route_id) {
@@ -355,6 +366,10 @@ bool ResourceScheduler::ShouldStartRequest(ScheduledResourceRequest* request,
return true;
}
+ if (client->using_spdy_proxy) {
+ return true;
+ }
+
const net::HttpServerProperties& http_server_properties =
*url_request.context()->http_server_properties();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698