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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 replacements.ClearRef(); | 892 replacements.ClearRef(); |
893 url = url.ReplaceComponents(replacements); | 893 url = url.ReplaceComponents(replacements); |
894 } else { | 894 } else { |
895 DCHECK(using_ssl_); | 895 DCHECK(using_ssl_); |
896 // The certificate of a QUIC alternative server is expected to be valid | 896 // The certificate of a QUIC alternative server is expected to be valid |
897 // for the origin of the request (in addition to being valid for the | 897 // for the origin of the request (in addition to being valid for the |
898 // server itself). | 898 // server itself). |
899 destination = destination_; | 899 destination = destination_; |
900 ssl_config = &server_ssl_config_; | 900 ssl_config = &server_ssl_config_; |
901 } | 901 } |
902 int rv = | 902 int rv = quic_request_.Request( |
903 quic_request_.Request(destination, request_info_.privacy_mode, | 903 destination, delegate_->GetAdvertisedQuicVersions(), |
904 ssl_config->GetCertVerifyFlags(), url, | 904 request_info_.privacy_mode, ssl_config->GetCertVerifyFlags(), url, |
905 request_info_.method, net_log_, io_callback_); | 905 request_info_.method, net_log_, io_callback_); |
906 if (rv == OK) { | 906 if (rv == OK) { |
907 using_existing_quic_session_ = true; | 907 using_existing_quic_session_ = true; |
908 } else { | 908 } else { |
909 // There's no available QUIC session. Inform the delegate how long to | 909 // There's no available QUIC session. Inform the delegate how long to |
910 // delay the main job. | 910 // delay the main job. |
911 if (rv == ERR_IO_PENDING) { | 911 if (rv == ERR_IO_PENDING) { |
912 delegate_->MaybeSetWaitTimeForMainJob( | 912 delegate_->MaybeSetWaitTimeForMainJob( |
913 quic_request_.GetTimeDelayForWaitingJob()); | 913 quic_request_.GetTimeDelayForWaitingJob()); |
914 } | 914 } |
915 } | 915 } |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1507 bool enable_ip_based_pooling, | 1507 bool enable_ip_based_pooling, |
1508 NetLog* net_log) { | 1508 NetLog* net_log) { |
1509 return base::MakeUnique<HttpStreamFactoryImpl::Job>( | 1509 return base::MakeUnique<HttpStreamFactoryImpl::Job>( |
1510 delegate, job_type, session, request_info, priority, proxy_info, | 1510 delegate, job_type, session, request_info, priority, proxy_info, |
1511 server_ssl_config, proxy_ssl_config, destination, origin_url, | 1511 server_ssl_config, proxy_ssl_config, destination, origin_url, |
1512 kProtoUnknown, alternative_proxy_server, enable_ip_based_pooling, | 1512 kProtoUnknown, alternative_proxy_server, enable_ip_based_pooling, |
1513 net_log); | 1513 net_log); |
1514 } | 1514 } |
1515 | 1515 |
1516 } // namespace net | 1516 } // namespace net |
OLD | NEW |