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

Side by Side Diff: net/http/http_stream_factory_impl_job.cc

Issue 8586015: Slow start pipelining. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for landing Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_stream_factory_impl_job.h ('k') | net/net.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "net/http/http_stream_factory_impl_job.h" 5 #include "net/http/http_stream_factory_impl_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 1130
1131 bool HttpStreamFactoryImpl::Job::IsPreconnecting() const { 1131 bool HttpStreamFactoryImpl::Job::IsPreconnecting() const {
1132 DCHECK_GE(num_streams_, 0); 1132 DCHECK_GE(num_streams_, 0);
1133 return num_streams_ > 0; 1133 return num_streams_ > 0;
1134 } 1134 }
1135 1135
1136 bool HttpStreamFactoryImpl::Job::IsOrphaned() const { 1136 bool HttpStreamFactoryImpl::Job::IsOrphaned() const {
1137 return !IsPreconnecting() && !request_; 1137 return !IsPreconnecting() && !request_;
1138 } 1138 }
1139 1139
1140 bool HttpStreamFactoryImpl::Job::IsRequestEligibleForPipelining() const { 1140 bool HttpStreamFactoryImpl::Job::IsRequestEligibleForPipelining() {
1141 if (!HttpStreamFactory::http_pipelining_enabled()) { 1141 if (!HttpStreamFactory::http_pipelining_enabled()) {
1142 return false; 1142 return false;
1143 } 1143 }
1144 if (IsPreconnecting() || !request_) { 1144 if (IsPreconnecting() || !request_) {
1145 return false; 1145 return false;
1146 } 1146 }
1147 if (using_ssl_) { 1147 if (using_ssl_) {
1148 return false; 1148 return false;
1149 } 1149 }
1150 return request_info_.method == "GET" || request_info_.method == "HEAD"; 1150 if (request_info_.method != "GET" && request_info_.method != "HEAD") {
1151 return false;
1152 }
1153 return stream_factory_->http_pipelined_host_pool_.IsHostEligibleForPipelining(
1154 origin_);
1151 } 1155 }
1152 1156
1153 } // namespace net 1157 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_job.h ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698