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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 original_url.EffectiveIntPort()); | 188 original_url.EffectiveIntPort()); |
189 | 189 |
190 HttpServerProperties& http_server_properties = | 190 HttpServerProperties& http_server_properties = |
191 *session_->http_server_properties(); | 191 *session_->http_server_properties(); |
192 if (!http_server_properties.HasAlternateProtocol(origin)) | 192 if (!http_server_properties.HasAlternateProtocol(origin)) |
193 return kNoAlternateProtocol; | 193 return kNoAlternateProtocol; |
194 | 194 |
195 AlternateProtocolInfo alternate = | 195 AlternateProtocolInfo alternate = |
196 http_server_properties.GetAlternateProtocol(origin); | 196 http_server_properties.GetAlternateProtocol(origin); |
197 if (alternate.protocol == ALTERNATE_PROTOCOL_BROKEN) { | 197 if (alternate.protocol == ALTERNATE_PROTOCOL_BROKEN) { |
198 HistogramAlternateProtocolUsage( | 198 HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_BROKEN); |
199 ALTERNATE_PROTOCOL_USAGE_BROKEN, | |
200 http_server_properties.GetAlternateProtocolExperiment()); | |
201 return kNoAlternateProtocol; | 199 return kNoAlternateProtocol; |
202 } | 200 } |
203 | 201 |
204 if (!IsAlternateProtocolValid(alternate.protocol)) { | 202 if (!IsAlternateProtocolValid(alternate.protocol)) { |
205 NOTREACHED(); | 203 NOTREACHED(); |
206 return kNoAlternateProtocol; | 204 return kNoAlternateProtocol; |
207 } | 205 } |
208 | 206 |
209 // Some shared unix systems may have user home directories (like | 207 // Some shared unix systems may have user home directories (like |
210 // http://foo.com/~mike) which allow users to emit headers. This is a bad | 208 // http://foo.com/~mike) which allow users to emit headers. This is a bad |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 delete job; | 299 delete job; |
302 } | 300 } |
303 | 301 |
304 void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { | 302 void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { |
305 preconnect_job_set_.erase(job); | 303 preconnect_job_set_.erase(job); |
306 delete job; | 304 delete job; |
307 OnPreconnectsCompleteInternal(); | 305 OnPreconnectsCompleteInternal(); |
308 } | 306 } |
309 | 307 |
310 } // namespace net | 308 } // namespace net |
OLD | NEW |