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

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

Issue 1815363002: Add RetainedRef uses where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 CHECK(connection_->socket()); 659 CHECK(connection_->socket());
660 CHECK(establishing_tunnel_); 660 CHECK(establishing_tunnel_);
661 661
662 next_state_ = STATE_WAITING_USER_ACTION; 662 next_state_ = STATE_WAITING_USER_ACTION;
663 ProxyClientSocket* proxy_socket = 663 ProxyClientSocket* proxy_socket =
664 static_cast<ProxyClientSocket*>(connection_->socket()); 664 static_cast<ProxyClientSocket*>(connection_->socket());
665 base::ThreadTaskRunnerHandle::Get()->PostTask( 665 base::ThreadTaskRunnerHandle::Get()->PostTask(
666 FROM_HERE, 666 FROM_HERE,
667 base::Bind(&Job::OnNeedsProxyAuthCallback, ptr_factory_.GetWeakPtr(), 667 base::Bind(&Job::OnNeedsProxyAuthCallback, ptr_factory_.GetWeakPtr(),
668 *proxy_socket->GetConnectResponseInfo(), 668 *proxy_socket->GetConnectResponseInfo(),
669 proxy_socket->GetAuthController())); 669 base::RetainedRef(proxy_socket->GetAuthController())));
670 return ERR_IO_PENDING; 670 return ERR_IO_PENDING;
671 } 671 }
672 672
673 case ERR_SSL_CLIENT_AUTH_CERT_NEEDED: 673 case ERR_SSL_CLIENT_AUTH_CERT_NEEDED:
674 base::ThreadTaskRunnerHandle::Get()->PostTask( 674 base::ThreadTaskRunnerHandle::Get()->PostTask(
675 FROM_HERE, 675 FROM_HERE,
676 base::Bind(&Job::OnNeedsClientAuthCallback, ptr_factory_.GetWeakPtr(), 676 base::Bind(
677 connection_->ssl_error_response_info().cert_request_info)); 677 &Job::OnNeedsClientAuthCallback, ptr_factory_.GetWeakPtr(),
678 base::RetainedRef(
679 connection_->ssl_error_response_info().cert_request_info)));
678 return ERR_IO_PENDING; 680 return ERR_IO_PENDING;
679 681
680 case ERR_HTTPS_PROXY_TUNNEL_RESPONSE: { 682 case ERR_HTTPS_PROXY_TUNNEL_RESPONSE: {
681 DCHECK(connection_.get()); 683 DCHECK(connection_.get());
682 DCHECK(connection_->socket()); 684 DCHECK(connection_->socket());
683 DCHECK(establishing_tunnel_); 685 DCHECK(establishing_tunnel_);
684 686
685 ProxyClientSocket* proxy_socket = 687 ProxyClientSocket* proxy_socket =
686 static_cast<ProxyClientSocket*>(connection_->socket()); 688 static_cast<ProxyClientSocket*>(connection_->socket());
687 base::ThreadTaskRunnerHandle::Get()->PostTask( 689 base::ThreadTaskRunnerHandle::Get()->PostTask(
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1819 if (connection_->socket()) { 1821 if (connection_->socket()) {
1820 ConnectionAttempts socket_attempts; 1822 ConnectionAttempts socket_attempts;
1821 connection_->socket()->GetConnectionAttempts(&socket_attempts); 1823 connection_->socket()->GetConnectionAttempts(&socket_attempts);
1822 request_->AddConnectionAttempts(socket_attempts); 1824 request_->AddConnectionAttempts(socket_attempts);
1823 } else { 1825 } else {
1824 request_->AddConnectionAttempts(connection_->connection_attempts()); 1826 request_->AddConnectionAttempts(connection_->connection_attempts());
1825 } 1827 }
1826 } 1828 }
1827 1829
1828 } // namespace net 1830 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698