| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 CHECK(connection_->socket()); | 644 CHECK(connection_->socket()); |
| 645 CHECK(establishing_tunnel_); | 645 CHECK(establishing_tunnel_); |
| 646 | 646 |
| 647 next_state_ = STATE_WAITING_USER_ACTION; | 647 next_state_ = STATE_WAITING_USER_ACTION; |
| 648 ProxyClientSocket* proxy_socket = | 648 ProxyClientSocket* proxy_socket = |
| 649 static_cast<ProxyClientSocket*>(connection_->socket()); | 649 static_cast<ProxyClientSocket*>(connection_->socket()); |
| 650 base::ThreadTaskRunnerHandle::Get()->PostTask( | 650 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 651 FROM_HERE, | 651 FROM_HERE, |
| 652 base::Bind(&Job::OnNeedsProxyAuthCallback, ptr_factory_.GetWeakPtr(), | 652 base::Bind(&Job::OnNeedsProxyAuthCallback, ptr_factory_.GetWeakPtr(), |
| 653 *proxy_socket->GetConnectResponseInfo(), | 653 *proxy_socket->GetConnectResponseInfo(), |
| 654 proxy_socket->GetAuthController())); | 654 base::RetainedRef(proxy_socket->GetAuthController()))); |
| 655 return ERR_IO_PENDING; | 655 return ERR_IO_PENDING; |
| 656 } | 656 } |
| 657 | 657 |
| 658 case ERR_SSL_CLIENT_AUTH_CERT_NEEDED: | 658 case ERR_SSL_CLIENT_AUTH_CERT_NEEDED: |
| 659 base::ThreadTaskRunnerHandle::Get()->PostTask( | 659 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 660 FROM_HERE, | 660 FROM_HERE, |
| 661 base::Bind(&Job::OnNeedsClientAuthCallback, ptr_factory_.GetWeakPtr(), | 661 base::Bind( |
| 662 connection_->ssl_error_response_info().cert_request_info)); | 662 &Job::OnNeedsClientAuthCallback, ptr_factory_.GetWeakPtr(), |
| 663 base::RetainedRef( |
| 664 connection_->ssl_error_response_info().cert_request_info))); |
| 663 return ERR_IO_PENDING; | 665 return ERR_IO_PENDING; |
| 664 | 666 |
| 665 case ERR_HTTPS_PROXY_TUNNEL_RESPONSE: { | 667 case ERR_HTTPS_PROXY_TUNNEL_RESPONSE: { |
| 666 DCHECK(connection_.get()); | 668 DCHECK(connection_.get()); |
| 667 DCHECK(connection_->socket()); | 669 DCHECK(connection_->socket()); |
| 668 DCHECK(establishing_tunnel_); | 670 DCHECK(establishing_tunnel_); |
| 669 | 671 |
| 670 ProxyClientSocket* proxy_socket = | 672 ProxyClientSocket* proxy_socket = |
| 671 static_cast<ProxyClientSocket*>(connection_->socket()); | 673 static_cast<ProxyClientSocket*>(connection_->socket()); |
| 672 base::ThreadTaskRunnerHandle::Get()->PostTask( | 674 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| (...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1791 if (connection_->socket()) { | 1793 if (connection_->socket()) { |
| 1792 ConnectionAttempts socket_attempts; | 1794 ConnectionAttempts socket_attempts; |
| 1793 connection_->socket()->GetConnectionAttempts(&socket_attempts); | 1795 connection_->socket()->GetConnectionAttempts(&socket_attempts); |
| 1794 request_->AddConnectionAttempts(socket_attempts); | 1796 request_->AddConnectionAttempts(socket_attempts); |
| 1795 } else { | 1797 } else { |
| 1796 request_->AddConnectionAttempts(connection_->connection_attempts()); | 1798 request_->AddConnectionAttempts(connection_->connection_attempts()); |
| 1797 } | 1799 } |
| 1798 } | 1800 } |
| 1799 | 1801 |
| 1800 } // namespace net | 1802 } // namespace net |
| OLD | NEW |