| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <set> | 5 #include <set> |
| 6 | 6 |
| 7 #include "content/browser/loader/resource_scheduler.h" | 7 #include "content/browser/loader/resource_scheduler.h" |
| 8 | 8 |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "content/common/resource_messages.h" | 10 #include "content/common/resource_messages.h" |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 // TODO(aiolos): We probably want to Coalesce these as well to avoid | 606 // TODO(aiolos): We probably want to Coalesce these as well to avoid |
| 607 // waking the disk. | 607 // waking the disk. |
| 608 if (!url_request.url().SchemeIsHTTPOrHTTPS()) { | 608 if (!url_request.url().SchemeIsHTTPOrHTTPS()) { |
| 609 return START_REQUEST; | 609 return START_REQUEST; |
| 610 } | 610 } |
| 611 | 611 |
| 612 if (throttle_state_ == COALESCED) { | 612 if (throttle_state_ == COALESCED) { |
| 613 return DO_NOT_START_REQUEST_AND_STOP_SEARCHING; | 613 return DO_NOT_START_REQUEST_AND_STOP_SEARCHING; |
| 614 } | 614 } |
| 615 | 615 |
| 616 if (using_spdy_proxy_ && url_request.url().SchemeIs("http")) { | 616 if (using_spdy_proxy_ && url_request.url().SchemeIs(url::kHttpScheme)) { |
| 617 return START_REQUEST; | 617 return START_REQUEST; |
| 618 } | 618 } |
| 619 | 619 |
| 620 net::HostPortPair host_port_pair = | 620 net::HostPortPair host_port_pair = |
| 621 net::HostPortPair::FromURL(url_request.url()); | 621 net::HostPortPair::FromURL(url_request.url()); |
| 622 net::HttpServerProperties& http_server_properties = | 622 net::HttpServerProperties& http_server_properties = |
| 623 *url_request.context()->http_server_properties(); | 623 *url_request.context()->http_server_properties(); |
| 624 | 624 |
| 625 // TODO(willchan): We should really improve this algorithm as described in | 625 // TODO(willchan): We should really improve this algorithm as described in |
| 626 // crbug.com/164101. Also, theoretically we should not count a SPDY request | 626 // crbug.com/164101. Also, theoretically we should not count a SPDY request |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 client->ReprioritizeRequest( | 1021 client->ReprioritizeRequest( |
| 1022 request, old_priority_params, new_priority_params); | 1022 request, old_priority_params, new_priority_params); |
| 1023 } | 1023 } |
| 1024 | 1024 |
| 1025 ResourceScheduler::ClientId ResourceScheduler::MakeClientId( | 1025 ResourceScheduler::ClientId ResourceScheduler::MakeClientId( |
| 1026 int child_id, int route_id) { | 1026 int child_id, int route_id) { |
| 1027 return (static_cast<ResourceScheduler::ClientId>(child_id) << 32) | route_id; | 1027 return (static_cast<ResourceScheduler::ClientId>(child_id) << 32) | route_id; |
| 1028 } | 1028 } |
| 1029 | 1029 |
| 1030 } // namespace content | 1030 } // namespace content |
| OLD | NEW |