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

Side by Side Diff: content/browser/loader/resource_scheduler.cc

Issue 598453004: Replace some hard coded schemes with the constants in /url/url_constants.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address the comment. Created 6 years, 2 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/child/npapi/plugin_url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698