| 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 if (!session_->params().enable_user_alternate_protocol_ports && | 230 if (!session_->params().enable_user_alternate_protocol_ports && |
| 231 (alternative_service.port >= kUnrestrictedPort && | 231 (alternative_service.port >= kUnrestrictedPort && |
| 232 origin.port() < kUnrestrictedPort)) | 232 origin.port() < kUnrestrictedPort)) |
| 233 continue; | 233 continue; |
| 234 | 234 |
| 235 if (alternative_service.protocol >= NPN_SPDY_MINIMUM_VERSION && | 235 if (alternative_service.protocol >= NPN_SPDY_MINIMUM_VERSION && |
| 236 alternative_service.protocol <= NPN_SPDY_MAXIMUM_VERSION) { | 236 alternative_service.protocol <= NPN_SPDY_MAXIMUM_VERSION) { |
| 237 if (!HttpStreamFactory::spdy_enabled()) | 237 if (!HttpStreamFactory::spdy_enabled()) |
| 238 continue; | 238 continue; |
| 239 | 239 |
| 240 // TODO(bnc): Re-enable when https://crbug.com/615413 is fixed. |
| 241 if (origin.host() != alternative_service.host) |
| 242 continue; |
| 243 |
| 240 // Cache this entry if we don't have a non-broken Alt-Svc yet. | 244 // Cache this entry if we don't have a non-broken Alt-Svc yet. |
| 241 if (first_alternative_service.protocol == | 245 if (first_alternative_service.protocol == |
| 242 UNINITIALIZED_ALTERNATE_PROTOCOL) | 246 UNINITIALIZED_ALTERNATE_PROTOCOL) |
| 243 first_alternative_service = alternative_service; | 247 first_alternative_service = alternative_service; |
| 244 continue; | 248 continue; |
| 245 } | 249 } |
| 246 | 250 |
| 247 DCHECK_EQ(QUIC, alternative_service.protocol); | 251 DCHECK_EQ(QUIC, alternative_service.protocol); |
| 248 quic_all_broken = false; | 252 quic_all_broken = false; |
| 249 if (!session_->params().enable_quic) | 253 if (!session_->params().enable_quic) |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 return true; | 372 return true; |
| 369 | 373 |
| 370 if (session_->params().transport_security_state->IsGooglePinnedHost(host)) | 374 if (session_->params().transport_security_state->IsGooglePinnedHost(host)) |
| 371 return true; | 375 return true; |
| 372 | 376 |
| 373 return ContainsKey(session_->params().quic_host_whitelist, | 377 return ContainsKey(session_->params().quic_host_whitelist, |
| 374 base::ToLowerASCII(host)); | 378 base::ToLowerASCII(host)); |
| 375 } | 379 } |
| 376 | 380 |
| 377 } // namespace net | 381 } // namespace net |
| OLD | NEW |