| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 original_url.EffectiveIntPort()); | 200 original_url.EffectiveIntPort()); |
| 201 | 201 |
| 202 HttpServerProperties& http_server_properties = | 202 HttpServerProperties& http_server_properties = |
| 203 *session_->http_server_properties(); | 203 *session_->http_server_properties(); |
| 204 if (!http_server_properties.HasAlternateProtocol(origin)) | 204 if (!http_server_properties.HasAlternateProtocol(origin)) |
| 205 return kNoAlternateProtocol; | 205 return kNoAlternateProtocol; |
| 206 | 206 |
| 207 PortAlternateProtocolPair alternate = | 207 PortAlternateProtocolPair alternate = |
| 208 http_server_properties.GetAlternateProtocol(origin); | 208 http_server_properties.GetAlternateProtocol(origin); |
| 209 if (alternate.protocol == ALTERNATE_PROTOCOL_BROKEN) { | 209 if (alternate.protocol == ALTERNATE_PROTOCOL_BROKEN) { |
| 210 HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_BROKEN); | 210 HistogramAlternateProtocolUsage( |
| 211 ALTERNATE_PROTOCOL_USAGE_BROKEN, |
| 212 http_server_properties.GetAlternateProtocolExperiment()); |
| 211 return kNoAlternateProtocol; | 213 return kNoAlternateProtocol; |
| 212 } | 214 } |
| 213 | 215 |
| 214 if (!IsAlternateProtocolValid(alternate.protocol)) { | 216 if (!IsAlternateProtocolValid(alternate.protocol)) { |
| 215 NOTREACHED(); | 217 NOTREACHED(); |
| 216 return kNoAlternateProtocol; | 218 return kNoAlternateProtocol; |
| 217 } | 219 } |
| 218 | 220 |
| 219 // Some shared unix systems may have user home directories (like | 221 // Some shared unix systems may have user home directories (like |
| 220 // http://foo.com/~mike) which allow users to emit headers. This is a bad | 222 // http://foo.com/~mike) which allow users to emit headers. This is a bad |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 it != requests_to_fail.end(); ++it) { | 351 it != requests_to_fail.end(); ++it) { |
| 350 Request* request = *it; | 352 Request* request = *it; |
| 351 if (request == request_map_[job]) { | 353 if (request == request_map_[job]) { |
| 352 continue; | 354 continue; |
| 353 } | 355 } |
| 354 request->OnStreamFailed(NULL, status, used_ssl_config); | 356 request->OnStreamFailed(NULL, status, used_ssl_config); |
| 355 } | 357 } |
| 356 } | 358 } |
| 357 | 359 |
| 358 } // namespace net | 360 } // namespace net |
| OLD | NEW |