Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: net/http/http_stream_factory_impl_job.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_spdy3_unittest.cc ('k') | net/http/http_stream_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698