| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
| 11 #include "net/base/net_util.h" | 11 #include "net/base/net_util.h" |
| 12 #include "net/http/http_network_session.h" | 12 #include "net/http/http_network_session.h" |
| 13 #include "net/http/http_pipelined_connection.h" |
| 14 #include "net/http/http_pipelined_host.h" |
| 15 #include "net/http/http_pipelined_stream.h" |
| 13 #include "net/http/http_server_properties.h" | 16 #include "net/http/http_server_properties.h" |
| 14 #include "net/http/http_stream_factory_impl_job.h" | 17 #include "net/http/http_stream_factory_impl_job.h" |
| 15 #include "net/http/http_stream_factory_impl_request.h" | 18 #include "net/http/http_stream_factory_impl_request.h" |
| 16 #include "net/spdy/spdy_http_stream.h" | 19 #include "net/spdy/spdy_http_stream.h" |
| 17 | 20 |
| 18 namespace net { | 21 namespace net { |
| 19 | 22 |
| 20 namespace { | 23 namespace { |
| 21 | 24 |
| 22 GURL UpgradeUrlToHttps(const GURL& original_url, int port) { | 25 GURL UpgradeUrlToHttps(const GURL& original_url, int port) { |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 orphaned_job_set_.erase(job); | 217 orphaned_job_set_.erase(job); |
| 215 delete job; | 218 delete job; |
| 216 } | 219 } |
| 217 | 220 |
| 218 void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { | 221 void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { |
| 219 preconnect_job_set_.erase(job); | 222 preconnect_job_set_.erase(job); |
| 220 delete job; | 223 delete job; |
| 221 OnPreconnectsCompleteInternal(); | 224 OnPreconnectsCompleteInternal(); |
| 222 } | 225 } |
| 223 | 226 |
| 227 void HttpStreamFactoryImpl::OnHttpPipelinedHostHasAdditionalCapacity( |
| 228 const HostPortPair& origin) { |
| 229 HttpPipelinedStream* stream; |
| 230 while (ContainsKey(http_pipelining_request_map_, origin) && |
| 231 (stream = session_->http_pipelined_host_pool()-> |
| 232 CreateStreamOnExistingPipeline(origin))) { |
| 233 Request* request = *http_pipelining_request_map_[origin].begin(); |
| 234 request->Complete(stream->was_npn_negotiated(), |
| 235 false, // not using_spdy |
| 236 stream->source()); |
| 237 request->OnStreamReady(NULL, |
| 238 stream->used_ssl_config(), |
| 239 stream->used_proxy_info(), |
| 240 stream); |
| 241 } |
| 242 } |
| 243 |
| 224 } // namespace net | 244 } // namespace net |
| OLD | NEW |