| 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_job.h" | 5 #include "net/http/http_stream_factory_impl_job.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 // static | 384 // static |
| 385 int HttpStreamFactoryImpl::Job::OnHostResolution( | 385 int HttpStreamFactoryImpl::Job::OnHostResolution( |
| 386 SpdySessionPool* spdy_session_pool, | 386 SpdySessionPool* spdy_session_pool, |
| 387 const SpdySessionKey& spdy_session_key, | 387 const SpdySessionKey& spdy_session_key, |
| 388 const AddressList& addresses, | 388 const AddressList& addresses, |
| 389 const BoundNetLog& net_log) { | 389 const BoundNetLog& net_log) { |
| 390 // It is OK to dereference spdy_session_pool, because the | 390 // It is OK to dereference spdy_session_pool, because the |
| 391 // ClientSocketPoolManager will be destroyed in the same callback that | 391 // ClientSocketPoolManager will be destroyed in the same callback that |
| 392 // destroys the SpdySessionPool. | 392 // destroys the SpdySessionPool. |
| 393 bool has_session = | 393 bool has_session = |
| 394 spdy_session_pool->GetIfExists(spdy_session_key, net_log) != NULL; | 394 spdy_session_pool->GetIfExists(spdy_session_key, net_log).get() != NULL; |
| 395 return has_session ? ERR_SPDY_SESSION_ALREADY_EXISTS : OK; | 395 return has_session ? ERR_SPDY_SESSION_ALREADY_EXISTS : OK; |
| 396 } | 396 } |
| 397 | 397 |
| 398 void HttpStreamFactoryImpl::Job::OnIOComplete(int result) { | 398 void HttpStreamFactoryImpl::Job::OnIOComplete(int result) { |
| 399 RunLoop(result); | 399 RunLoop(result); |
| 400 } | 400 } |
| 401 | 401 |
| 402 int HttpStreamFactoryImpl::Job::RunLoop(int result) { | 402 int HttpStreamFactoryImpl::Job::RunLoop(int result) { |
| 403 result = DoLoop(result); | 403 result = DoLoop(result); |
| 404 | 404 |
| 405 if (result == ERR_IO_PENDING) | 405 if (result == ERR_IO_PENDING) |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1375 (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH | | 1375 (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH | |
| 1376 net::LOAD_IS_DOWNLOAD)) { | 1376 net::LOAD_IS_DOWNLOAD)) { |
| 1377 // Avoid pipelining resources that may be streamed for a long time. | 1377 // Avoid pipelining resources that may be streamed for a long time. |
| 1378 return false; | 1378 return false; |
| 1379 } | 1379 } |
| 1380 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining( | 1380 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining( |
| 1381 *http_pipelining_key_.get()); | 1381 *http_pipelining_key_.get()); |
| 1382 } | 1382 } |
| 1383 | 1383 |
| 1384 } // namespace net | 1384 } // namespace net |
| OLD | NEW |