| 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 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 | 792 |
| 793 if (using_quic_) { | 793 if (using_quic_) { |
| 794 if (proxy_info_.is_quic() && !request_info_.url.SchemeIs("http")) { | 794 if (proxy_info_.is_quic() && !request_info_.url.SchemeIs("http")) { |
| 795 NOTREACHED(); | 795 NOTREACHED(); |
| 796 // TODO(rch): support QUIC proxies for HTTPS urls. | 796 // TODO(rch): support QUIC proxies for HTTPS urls. |
| 797 return ERR_NOT_IMPLEMENTED; | 797 return ERR_NOT_IMPLEMENTED; |
| 798 } | 798 } |
| 799 HostPortPair destination = proxy_info_.is_quic() | 799 HostPortPair destination = proxy_info_.is_quic() |
| 800 ? proxy_info_.proxy_server().host_port_pair() | 800 ? proxy_info_.proxy_server().host_port_pair() |
| 801 : server_; | 801 : server_; |
| 802 next_state_ = STATE_INIT_CONNECTION_COMPLETE; | |
| 803 bool secure_quic = using_ssl_ || proxy_info_.is_quic(); | 802 bool secure_quic = using_ssl_ || proxy_info_.is_quic(); |
| 804 int rv = quic_request_.Request( | 803 int rv = quic_request_.Request( |
| 805 destination, secure_quic, request_info_.privacy_mode, | 804 destination, secure_quic, request_info_.privacy_mode, |
| 806 request_info_.method, net_log_, io_callback_); | 805 request_info_.method, net_log_, io_callback_); |
| 807 if (rv == OK) { | 806 if (rv == OK) { |
| 808 using_existing_quic_session_ = true; | 807 using_existing_quic_session_ = true; |
| 809 } else { | 808 } else { |
| 810 // OK, there's no available QUIC session. Let |waiting_job_| resume | 809 // OK, there's no available QUIC session. Let |waiting_job_| resume |
| 811 // if it's paused. | 810 // if it's paused. |
| 812 if (waiting_job_) { | 811 if (waiting_job_) { |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1528 | 1527 |
| 1529 void HttpStreamFactoryImpl::Job:: | 1528 void HttpStreamFactoryImpl::Job:: |
| 1530 MaybeCopyConnectionAttemptsFromClientSocketHandleToRequest() { | 1529 MaybeCopyConnectionAttemptsFromClientSocketHandleToRequest() { |
| 1531 if (IsOrphaned() || !connection_) | 1530 if (IsOrphaned() || !connection_) |
| 1532 return; | 1531 return; |
| 1533 | 1532 |
| 1534 request_->AddConnectionAttempts(connection_->connection_attempts()); | 1533 request_->AddConnectionAttempts(connection_->connection_attempts()); |
| 1535 } | 1534 } |
| 1536 | 1535 |
| 1537 } // namespace net | 1536 } // namespace net |
| OLD | NEW |