| 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 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 void HttpStreamFactoryImpl::Job::Start(Request* request) { | 127 void HttpStreamFactoryImpl::Job::Start(Request* request) { |
| 128 DCHECK(request); | 128 DCHECK(request); |
| 129 request_ = request; | 129 request_ = request; |
| 130 StartInternal(); | 130 StartInternal(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 int HttpStreamFactoryImpl::Job::Preconnect(int num_streams) { | 133 int HttpStreamFactoryImpl::Job::Preconnect(int num_streams) { |
| 134 DCHECK_GT(num_streams, 0); | 134 DCHECK_GT(num_streams, 0); |
| 135 base::WeakPtr<HttpServerProperties> http_server_properties = | 135 base::WeakPtr<HttpServerProperties> http_server_properties = |
| 136 session_->http_server_properties(); | 136 session_->http_server_properties(); |
| 137 if (http_server_properties && http_server_properties->SupportsSpdy( | 137 if (http_server_properties && |
| 138 HostPortPair::FromURL(request_info_.url))) { | 138 http_server_properties->SupportsRequestPriority( |
| 139 HostPortPair::FromURL(request_info_.url))) { |
| 139 num_streams_ = 1; | 140 num_streams_ = 1; |
| 140 } else { | 141 } else { |
| 141 num_streams_ = num_streams; | 142 num_streams_ = num_streams; |
| 142 } | 143 } |
| 143 return StartInternal(); | 144 return StartInternal(); |
| 144 } | 145 } |
| 145 | 146 |
| 146 int HttpStreamFactoryImpl::Job::RestartTunnelWithProxyAuth( | 147 int HttpStreamFactoryImpl::Job::RestartTunnelWithProxyAuth( |
| 147 const AuthCredentials& credentials) { | 148 const AuthCredentials& credentials) { |
| 148 DCHECK(establishing_tunnel_); | 149 DCHECK(establishing_tunnel_); |
| (...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1473 | 1474 |
| 1474 if (job_status_ == STATUS_SUCCEEDED && other_job_status_ == STATUS_BROKEN) { | 1475 if (job_status_ == STATUS_SUCCEEDED && other_job_status_ == STATUS_BROKEN) { |
| 1475 HistogramBrokenAlternateProtocolLocation( | 1476 HistogramBrokenAlternateProtocolLocation( |
| 1476 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN); | 1477 BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN); |
| 1477 session_->http_server_properties()->SetBrokenAlternateProtocol( | 1478 session_->http_server_properties()->SetBrokenAlternateProtocol( |
| 1478 HostPortPair::FromURL(request_info_.url)); | 1479 HostPortPair::FromURL(request_info_.url)); |
| 1479 } | 1480 } |
| 1480 } | 1481 } |
| 1481 | 1482 |
| 1482 } // namespace net | 1483 } // namespace net |
| OLD | NEW |