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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 if (session_->HasSpdyExclusion(origin)) | 226 if (session_->HasSpdyExclusion(origin)) |
227 return kNoAlternativeService; | 227 return kNoAlternativeService; |
228 | 228 |
229 *alternate_url = UpgradeUrlToHttps(original_url, alternative_service.port); | 229 *alternate_url = UpgradeUrlToHttps(original_url, alternative_service.port); |
230 } else { | 230 } else { |
231 DCHECK_EQ(QUIC, alternative_service.protocol); | 231 DCHECK_EQ(QUIC, alternative_service.protocol); |
232 if (!session_->params().enable_quic) | 232 if (!session_->params().enable_quic) |
233 return kNoAlternativeService; | 233 return kNoAlternativeService; |
234 | 234 |
| 235 if (session_->quic_stream_factory()->IsQuicDisabled(origin.port())) |
| 236 return kNoAlternativeService; |
| 237 |
235 // TODO(rch): Figure out how to make QUIC iteract with PAC | 238 // TODO(rch): Figure out how to make QUIC iteract with PAC |
236 // scripts. By not re-writing the URL, we will query the PAC script | 239 // scripts. By not re-writing the URL, we will query the PAC script |
237 // for the proxy to use to reach the original URL via TCP. But | 240 // for the proxy to use to reach the original URL via TCP. But |
238 // the alternate request will be going via UDP to a different port. | 241 // the alternate request will be going via UDP to a different port. |
239 *alternate_url = original_url; | 242 *alternate_url = original_url; |
240 } | 243 } |
241 return alternative_service; | 244 return alternative_service; |
242 } | 245 } |
243 | 246 |
244 void HttpStreamFactoryImpl::OrphanJob(Job* job, const Request* request) { | 247 void HttpStreamFactoryImpl::OrphanJob(Job* job, const Request* request) { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 delete job; | 303 delete job; |
301 } | 304 } |
302 | 305 |
303 void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { | 306 void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { |
304 preconnect_job_set_.erase(job); | 307 preconnect_job_set_.erase(job); |
305 delete job; | 308 delete job; |
306 OnPreconnectsCompleteInternal(); | 309 OnPreconnectsCompleteInternal(); |
307 } | 310 } |
308 | 311 |
309 } // namespace net | 312 } // namespace net |
OLD | NEW |