| 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 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 return ERR_QUIC_PROTOCOL_ERROR; | 1000 return ERR_QUIC_PROTOCOL_ERROR; |
| 1001 } else { | 1001 } else { |
| 1002 DCHECK(using_ssl_); | 1002 DCHECK(using_ssl_); |
| 1003 // The certificate of a QUIC alternative server is expected to be valid | 1003 // The certificate of a QUIC alternative server is expected to be valid |
| 1004 // for the origin of the request (in addition to being valid for the | 1004 // for the origin of the request (in addition to being valid for the |
| 1005 // server itself). | 1005 // server itself). |
| 1006 destination = server_; | 1006 destination = server_; |
| 1007 origin_host = origin_url_.host(); | 1007 origin_host = origin_url_.host(); |
| 1008 ssl_config = &server_ssl_config_; | 1008 ssl_config = &server_ssl_config_; |
| 1009 } | 1009 } |
| 1010 int rv = | 1010 |
| 1011 quic_request_.Request(destination, request_info_.privacy_mode, | 1011 int rv = quic_request_.Request( |
| 1012 ssl_config->GetCertVerifyFlags(), origin_host, | 1012 destination, request_info_.privacy_mode, |
| 1013 request_info_.method, net_log_, io_callback_); | 1013 ssl_config->GetCertVerifyFlags(), origin_host, request_info_.method, |
| 1014 request_info_.url.spec(), net_log_, io_callback_); |
| 1014 if (rv == OK) { | 1015 if (rv == OK) { |
| 1015 using_existing_quic_session_ = true; | 1016 using_existing_quic_session_ = true; |
| 1016 } else { | 1017 } else { |
| 1017 // OK, there's no available QUIC session. Let |waiting_job_| resume | 1018 // OK, there's no available QUIC session. Let |waiting_job_| resume |
| 1018 // if it's paused. | 1019 // if it's paused. |
| 1019 if (waiting_job_) { | 1020 if (waiting_job_) { |
| 1020 if (rv == ERR_IO_PENDING) { | 1021 if (rv == ERR_IO_PENDING) { |
| 1021 // Start the |waiting_job_| after the delay returned by | 1022 // Start the |waiting_job_| after the delay returned by |
| 1022 // GetTimeDelayForWaitingJob(). | 1023 // GetTimeDelayForWaitingJob(). |
| 1023 // | 1024 // |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1789 if (connection_->socket()) { | 1790 if (connection_->socket()) { |
| 1790 ConnectionAttempts socket_attempts; | 1791 ConnectionAttempts socket_attempts; |
| 1791 connection_->socket()->GetConnectionAttempts(&socket_attempts); | 1792 connection_->socket()->GetConnectionAttempts(&socket_attempts); |
| 1792 request_->AddConnectionAttempts(socket_attempts); | 1793 request_->AddConnectionAttempts(socket_attempts); |
| 1793 } else { | 1794 } else { |
| 1794 request_->AddConnectionAttempts(connection_->connection_attempts()); | 1795 request_->AddConnectionAttempts(connection_->connection_attempts()); |
| 1795 } | 1796 } |
| 1796 } | 1797 } |
| 1797 | 1798 |
| 1798 } // namespace net | 1799 } // namespace net |
| OLD | NEW |