| 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 "net/http/http_stream_factory_impl_job.h" | 5 #include "net/http/http_stream_factory_impl_job.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 request_ = request; | 247 request_ = request; |
| 248 // Saves |stream_type_|, since request is nulled when job is orphaned. | 248 // Saves |stream_type_|, since request is nulled when job is orphaned. |
| 249 stream_type_ = request_->stream_type(); | 249 stream_type_ = request_->stream_type(); |
| 250 StartInternal(); | 250 StartInternal(); |
| 251 } | 251 } |
| 252 | 252 |
| 253 int HttpStreamFactoryImpl::Job::Preconnect(int num_streams) { | 253 int HttpStreamFactoryImpl::Job::Preconnect(int num_streams) { |
| 254 DCHECK_GT(num_streams, 0); | 254 DCHECK_GT(num_streams, 0); |
| 255 base::WeakPtr<HttpServerProperties> http_server_properties = | 255 base::WeakPtr<HttpServerProperties> http_server_properties = |
| 256 session_->http_server_properties(); | 256 session_->http_server_properties(); |
| 257 url::SchemeHostPort scheme_origin(request_info_.url); |
| 257 if (http_server_properties && | 258 if (http_server_properties && |
| 258 http_server_properties->SupportsRequestPriority( | 259 http_server_properties->SupportsRequestPriority(scheme_origin)) { |
| 259 HostPortPair::FromURL(request_info_.url))) { | |
| 260 num_streams_ = 1; | 260 num_streams_ = 1; |
| 261 } else { | 261 } else { |
| 262 num_streams_ = num_streams; | 262 num_streams_ = num_streams; |
| 263 } | 263 } |
| 264 return StartInternal(); | 264 return StartInternal(); |
| 265 } | 265 } |
| 266 | 266 |
| 267 int HttpStreamFactoryImpl::Job::RestartTunnelWithProxyAuth( | 267 int HttpStreamFactoryImpl::Job::RestartTunnelWithProxyAuth( |
| 268 const AuthCredentials& credentials) { | 268 const AuthCredentials& credentials) { |
| 269 DCHECK(establishing_tunnel_); | 269 DCHECK(establishing_tunnel_); |
| (...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1793 if (connection_->socket()) { | 1793 if (connection_->socket()) { |
| 1794 ConnectionAttempts socket_attempts; | 1794 ConnectionAttempts socket_attempts; |
| 1795 connection_->socket()->GetConnectionAttempts(&socket_attempts); | 1795 connection_->socket()->GetConnectionAttempts(&socket_attempts); |
| 1796 request_->AddConnectionAttempts(socket_attempts); | 1796 request_->AddConnectionAttempts(socket_attempts); |
| 1797 } else { | 1797 } else { |
| 1798 request_->AddConnectionAttempts(connection_->connection_attempts()); | 1798 request_->AddConnectionAttempts(connection_->connection_attempts()); |
| 1799 } | 1799 } |
| 1800 } | 1800 } |
| 1801 | 1801 |
| 1802 } // namespace net | 1802 } // namespace net |
| OLD | NEW |