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 "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
10 #include "net/base/net_log.h" | 10 #include "net/base/net_log.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 proxy_ssl_config, session_->net_log()); | 116 proxy_ssl_config, session_->net_log()); |
117 } | 117 } |
118 preconnect_job_set_.insert(job); | 118 preconnect_job_set_.insert(job); |
119 job->Preconnect(num_streams); | 119 job->Preconnect(num_streams); |
120 } | 120 } |
121 | 121 |
122 base::Value* HttpStreamFactoryImpl::PipelineInfoToValue() const { | 122 base::Value* HttpStreamFactoryImpl::PipelineInfoToValue() const { |
123 return http_pipelined_host_pool_.PipelineInfoToValue(); | 123 return http_pipelined_host_pool_.PipelineInfoToValue(); |
124 } | 124 } |
125 | 125 |
126 const HostMappingRules* HttpStreamFactoryImpl::GetHostMappingRules() const { | |
127 return session_->params().host_mapping_rules; | |
128 } | |
129 | |
130 | |
mmenke
2012/08/23 18:11:28
nit: Remove extra empty line.
| |
126 bool HttpStreamFactoryImpl::GetAlternateProtocolRequestFor( | 131 bool HttpStreamFactoryImpl::GetAlternateProtocolRequestFor( |
127 const GURL& original_url, | 132 const GURL& original_url, |
128 GURL* alternate_url) const { | 133 GURL* alternate_url) const { |
129 if (!spdy_enabled()) | 134 if (!spdy_enabled()) |
130 return false; | 135 return false; |
131 | 136 |
132 if (!use_alternate_protocols()) | 137 if (!use_alternate_protocols()) |
133 return false; | 138 return false; |
134 | 139 |
135 HostPortPair origin = HostPortPair(original_url.HostNoBrackets(), | 140 HostPortPair origin = HostPortPair(original_url.HostNoBrackets(), |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
254 it != requests_to_fail.end(); ++it) { | 259 it != requests_to_fail.end(); ++it) { |
255 Request* request = *it; | 260 Request* request = *it; |
256 if (request == request_map_[job]) { | 261 if (request == request_map_[job]) { |
257 continue; | 262 continue; |
258 } | 263 } |
259 request->OnStreamFailed(NULL, status, used_ssl_config); | 264 request->OnStreamFailed(NULL, status, used_ssl_config); |
260 } | 265 } |
261 } | 266 } |
262 | 267 |
263 } // namespace net | 268 } // namespace net |
OLD | NEW |