| 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/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 if (!session_->params().enable_user_alternate_protocol_ports && | 258 if (!session_->params().enable_user_alternate_protocol_ports && |
| 259 (alternative_service.port >= kUnrestrictedPort && | 259 (alternative_service.port >= kUnrestrictedPort && |
| 260 origin.port() < kUnrestrictedPort)) | 260 origin.port() < kUnrestrictedPort)) |
| 261 continue; | 261 continue; |
| 262 | 262 |
| 263 if (alternative_service.protocol >= NPN_SPDY_MINIMUM_VERSION && | 263 if (alternative_service.protocol >= NPN_SPDY_MINIMUM_VERSION && |
| 264 alternative_service.protocol <= NPN_SPDY_MAXIMUM_VERSION) { | 264 alternative_service.protocol <= NPN_SPDY_MAXIMUM_VERSION) { |
| 265 if (!HttpStreamFactory::spdy_enabled()) | 265 if (!HttpStreamFactory::spdy_enabled()) |
| 266 continue; | 266 continue; |
| 267 | 267 |
| 268 // TODO(bnc): Re-enable when https://crbug.com/615413 is fixed. |
| 269 if (origin.host() != alternative_service.host) |
| 270 continue; |
| 271 |
| 268 // Cache this entry if we don't have a non-broken Alt-Svc yet. | 272 // Cache this entry if we don't have a non-broken Alt-Svc yet. |
| 269 if (first_alternative_service.protocol == | 273 if (first_alternative_service.protocol == |
| 270 UNINITIALIZED_ALTERNATE_PROTOCOL) | 274 UNINITIALIZED_ALTERNATE_PROTOCOL) |
| 271 first_alternative_service = alternative_service; | 275 first_alternative_service = alternative_service; |
| 272 continue; | 276 continue; |
| 273 } | 277 } |
| 274 | 278 |
| 275 DCHECK_EQ(QUIC, alternative_service.protocol); | 279 DCHECK_EQ(QUIC, alternative_service.protocol); |
| 276 quic_all_broken = false; | 280 quic_all_broken = false; |
| 277 if (!session_->params().enable_quic) | 281 if (!session_->params().enable_quic) |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 return true; | 400 return true; |
| 397 | 401 |
| 398 if (session_->params().transport_security_state->IsGooglePinnedHost(host)) | 402 if (session_->params().transport_security_state->IsGooglePinnedHost(host)) |
| 399 return true; | 403 return true; |
| 400 | 404 |
| 401 return ContainsKey(session_->params().quic_host_whitelist, | 405 return ContainsKey(session_->params().quic_host_whitelist, |
| 402 base::ToLowerASCII(host)); | 406 base::ToLowerASCII(host)); |
| 403 } | 407 } |
| 404 | 408 |
| 405 } // namespace net | 409 } // namespace net |
| OLD | NEW |