| 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 // pqueue (Order by priority first, then FIFO within same priority). Unclear | 233 // pqueue (Order by priority first, then FIFO within same priority). Unclear |
| 234 // that it matters here. | 234 // that it matters here. |
| 235 if (!ContainsKey(spdy_session_request_map_, spdy_session_key)) | 235 if (!ContainsKey(spdy_session_request_map_, spdy_session_key)) |
| 236 break; | 236 break; |
| 237 Request* request = *spdy_session_request_map_[spdy_session_key].begin(); | 237 Request* request = *spdy_session_request_map_[spdy_session_key].begin(); |
| 238 request->Complete(was_npn_negotiated, | 238 request->Complete(was_npn_negotiated, |
| 239 protocol_negotiated, | 239 protocol_negotiated, |
| 240 using_spdy, | 240 using_spdy, |
| 241 net_log); | 241 net_log); |
| 242 bool use_relative_url = direct || request->url().SchemeIs("https"); | 242 bool use_relative_url = direct || request->url().SchemeIs("https"); |
| 243 request->OnStreamReady(NULL, used_ssl_config, used_proxy_info, | 243 request->OnStreamReady( |
| 244 new SpdyHttpStream(spdy_session, use_relative_url)); | 244 NULL, |
| 245 used_ssl_config, |
| 246 used_proxy_info, |
| 247 new SpdyHttpStream(spdy_session.get(), use_relative_url)); |
| 245 } | 248 } |
| 246 // TODO(mbelshe): Alert other valid requests. | 249 // TODO(mbelshe): Alert other valid requests. |
| 247 } | 250 } |
| 248 | 251 |
| 249 void HttpStreamFactoryImpl::OnOrphanedJobComplete(const Job* job) { | 252 void HttpStreamFactoryImpl::OnOrphanedJobComplete(const Job* job) { |
| 250 orphaned_job_set_.erase(job); | 253 orphaned_job_set_.erase(job); |
| 251 delete job; | 254 delete job; |
| 252 } | 255 } |
| 253 | 256 |
| 254 void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { | 257 void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 it != requests_to_fail.end(); ++it) { | 290 it != requests_to_fail.end(); ++it) { |
| 288 Request* request = *it; | 291 Request* request = *it; |
| 289 if (request == request_map_[job]) { | 292 if (request == request_map_[job]) { |
| 290 continue; | 293 continue; |
| 291 } | 294 } |
| 292 request->OnStreamFailed(NULL, status, used_ssl_config); | 295 request->OnStreamFailed(NULL, status, used_ssl_config); |
| 293 } | 296 } |
| 294 } | 297 } |
| 295 | 298 |
| 296 } // namespace net | 299 } // namespace net |
| OLD | NEW |