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.h" | 5 #include "net/http/http_stream_factory_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 preconnect_job_set_.insert(job); | 145 preconnect_job_set_.insert(job); |
146 job->Preconnect(num_streams); | 146 job->Preconnect(num_streams); |
147 } | 147 } |
148 | 148 |
149 const HostMappingRules* HttpStreamFactoryImpl::GetHostMappingRules() const { | 149 const HostMappingRules* HttpStreamFactoryImpl::GetHostMappingRules() const { |
150 return session_->params().host_mapping_rules; | 150 return session_->params().host_mapping_rules; |
151 } | 151 } |
152 | 152 |
153 AlternativeServiceVector HttpStreamFactoryImpl::GetAlternativeServicesFor( | 153 AlternativeServiceVector HttpStreamFactoryImpl::GetAlternativeServicesFor( |
154 const GURL& original_url) { | 154 const GURL& original_url) { |
155 if (!session_->params().use_alternate_protocols) | 155 if (!session_->params().use_alternative_services) |
156 return AlternativeServiceVector(); | 156 return AlternativeServiceVector(); |
157 | 157 |
158 if (original_url.SchemeIs("ftp")) | 158 if (original_url.SchemeIs("ftp")) |
159 return AlternativeServiceVector(); | 159 return AlternativeServiceVector(); |
160 | 160 |
161 HostPortPair origin = HostPortPair::FromURL(original_url); | 161 HostPortPair origin = HostPortPair::FromURL(original_url); |
162 HttpServerProperties& http_server_properties = | 162 HttpServerProperties& http_server_properties = |
163 *session_->http_server_properties(); | 163 *session_->http_server_properties(); |
164 const AlternativeServiceVector alternative_service_vector = | 164 const AlternativeServiceVector alternative_service_vector = |
165 http_server_properties.GetAlternativeServices(origin); | 165 http_server_properties.GetAlternativeServices(origin); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 delete job; | 274 delete job; |
275 } | 275 } |
276 | 276 |
277 void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { | 277 void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { |
278 preconnect_job_set_.erase(job); | 278 preconnect_job_set_.erase(job); |
279 delete job; | 279 delete job; |
280 OnPreconnectsCompleteInternal(); | 280 OnPreconnectsCompleteInternal(); |
281 } | 281 } |
282 | 282 |
283 } // namespace net | 283 } // namespace net |
OLD | NEW |