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/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 request->Complete(was_npn_negotiated, | 284 request->Complete(was_npn_negotiated, |
285 protocol_negotiated, | 285 protocol_negotiated, |
286 using_spdy, | 286 using_spdy, |
287 net_log); | 287 net_log); |
288 if (for_websockets_) { | 288 if (for_websockets_) { |
289 WebSocketStreamBase::Factory* factory = | 289 WebSocketStreamBase::Factory* factory = |
290 request->websocket_stream_factory(); | 290 request->websocket_stream_factory(); |
291 DCHECK(factory); | 291 DCHECK(factory); |
292 bool use_relative_url = direct || request->url().SchemeIs("wss"); | 292 bool use_relative_url = direct || request->url().SchemeIs("wss"); |
293 request->OnWebSocketStreamReady( | 293 request->OnWebSocketStreamReady( |
294 NULL, used_ssl_config, used_proxy_info, | 294 NULL, |
295 factory->CreateSpdyStream(spdy_session, use_relative_url)); | 295 used_ssl_config, |
| 296 used_proxy_info, |
| 297 factory->CreateSpdyStream(spdy_session.get(), use_relative_url)); |
296 } else { | 298 } else { |
297 bool use_relative_url = direct || request->url().SchemeIs("https"); | 299 bool use_relative_url = direct || request->url().SchemeIs("https"); |
298 request->OnStreamReady(NULL, used_ssl_config, used_proxy_info, | 300 request->OnStreamReady( |
299 new SpdyHttpStream(spdy_session, | 301 NULL, |
300 use_relative_url)); | 302 used_ssl_config, |
| 303 used_proxy_info, |
| 304 new SpdyHttpStream(spdy_session.get(), use_relative_url)); |
301 } | 305 } |
302 } | 306 } |
303 // TODO(mbelshe): Alert other valid requests. | 307 // TODO(mbelshe): Alert other valid requests. |
304 } | 308 } |
305 | 309 |
306 void HttpStreamFactoryImpl::OnOrphanedJobComplete(const Job* job) { | 310 void HttpStreamFactoryImpl::OnOrphanedJobComplete(const Job* job) { |
307 orphaned_job_set_.erase(job); | 311 orphaned_job_set_.erase(job); |
308 delete job; | 312 delete job; |
309 } | 313 } |
310 | 314 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 it != requests_to_fail.end(); ++it) { | 348 it != requests_to_fail.end(); ++it) { |
345 Request* request = *it; | 349 Request* request = *it; |
346 if (request == request_map_[job]) { | 350 if (request == request_map_[job]) { |
347 continue; | 351 continue; |
348 } | 352 } |
349 request->OnStreamFailed(NULL, status, used_ssl_config); | 353 request->OnStreamFailed(NULL, status, used_ssl_config); |
350 } | 354 } |
351 } | 355 } |
352 | 356 |
353 } // namespace net | 357 } // namespace net |
OLD | NEW |