| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 continue; | 204 continue; |
| 205 } | 205 } |
| 206 | 206 |
| 207 DCHECK_EQ(QUIC, alternative_service.protocol); | 207 DCHECK_EQ(QUIC, alternative_service.protocol); |
| 208 if (!session_->params().enable_quic) | 208 if (!session_->params().enable_quic) |
| 209 continue; | 209 continue; |
| 210 | 210 |
| 211 if (session_->quic_stream_factory()->IsQuicDisabled(origin.port())) | 211 if (session_->quic_stream_factory()->IsQuicDisabled(origin.port())) |
| 212 continue; | 212 continue; |
| 213 | 213 |
| 214 if (!session_->params().enable_insecure_quic && | 214 if (!original_url.SchemeIs("https")) { |
| 215 !original_url.SchemeIs("https")) { | |
| 216 continue; | 215 continue; |
| 217 } | 216 } |
| 218 | 217 |
| 219 enabled_alternative_service_vector.push_back(alternative_service); | 218 enabled_alternative_service_vector.push_back(alternative_service); |
| 220 } | 219 } |
| 221 return enabled_alternative_service_vector; | 220 return enabled_alternative_service_vector; |
| 222 } | 221 } |
| 223 | 222 |
| 224 void HttpStreamFactoryImpl::OrphanJob(Job* job, const Request* request) { | 223 void HttpStreamFactoryImpl::OrphanJob(Job* job, const Request* request) { |
| 225 DCHECK(ContainsKey(request_map_, job)); | 224 DCHECK(ContainsKey(request_map_, job)); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 delete job; | 276 delete job; |
| 278 } | 277 } |
| 279 | 278 |
| 280 void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { | 279 void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { |
| 281 preconnect_job_set_.erase(job); | 280 preconnect_job_set_.erase(job); |
| 282 delete job; | 281 delete job; |
| 283 OnPreconnectsCompleteInternal(); | 282 OnPreconnectsCompleteInternal(); |
| 284 } | 283 } |
| 285 | 284 |
| 286 } // namespace net | 285 } // namespace net |
| OLD | NEW |