| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_controller.h" | 5 #include "net/http/http_stream_factory_impl_job_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 if (!session_->params().enable_http2_alternative_service) | 987 if (!session_->params().enable_http2_alternative_service) |
| 988 continue; | 988 continue; |
| 989 | 989 |
| 990 // Cache this entry if we don't have a non-broken Alt-Svc yet. | 990 // Cache this entry if we don't have a non-broken Alt-Svc yet. |
| 991 if (first_alternative_service.protocol == kProtoUnknown) | 991 if (first_alternative_service.protocol == kProtoUnknown) |
| 992 first_alternative_service = alternative_service; | 992 first_alternative_service = alternative_service; |
| 993 continue; | 993 continue; |
| 994 } | 994 } |
| 995 | 995 |
| 996 DCHECK_EQ(kProtoQUIC, alternative_service.protocol); | 996 DCHECK_EQ(kProtoQUIC, alternative_service.protocol); |
| 997 if (origin.host() != alternative_service.host && | |
| 998 !session_->params() | |
| 999 .enable_quic_alternative_service_with_different_host) { | |
| 1000 continue; | |
| 1001 } | |
| 1002 | |
| 1003 quic_all_broken = false; | 997 quic_all_broken = false; |
| 1004 if (!session_->IsQuicEnabled()) | 998 if (!session_->IsQuicEnabled()) |
| 1005 continue; | 999 continue; |
| 1006 | 1000 |
| 1007 if (stream_type == HttpStreamRequest::BIDIRECTIONAL_STREAM && | 1001 if (stream_type == HttpStreamRequest::BIDIRECTIONAL_STREAM && |
| 1008 session_->params().quic_disable_bidirectional_streams) { | 1002 session_->params().quic_disable_bidirectional_streams) { |
| 1009 continue; | 1003 continue; |
| 1010 } | 1004 } |
| 1011 | 1005 |
| 1012 if (!original_url.SchemeIs(url::kHttpsScheme)) | 1006 if (!original_url.SchemeIs(url::kHttpsScheme)) |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 return; | 1129 return; |
| 1136 DCHECK(alternative_job_->alternative_proxy_server().is_valid()); | 1130 DCHECK(alternative_job_->alternative_proxy_server().is_valid()); |
| 1137 alternative_job_->Start(request_->stream_type()); | 1131 alternative_job_->Start(request_->stream_type()); |
| 1138 } | 1132 } |
| 1139 | 1133 |
| 1140 bool HttpStreamFactoryImpl::JobController::IsJobOrphaned(Job* job) const { | 1134 bool HttpStreamFactoryImpl::JobController::IsJobOrphaned(Job* job) const { |
| 1141 return !request_ || (job_bound_ && bound_job_ != job); | 1135 return !request_ || (job_bound_ && bound_job_ != job); |
| 1142 } | 1136 } |
| 1143 | 1137 |
| 1144 } // namespace net | 1138 } // namespace net |
| OLD | NEW |