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 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1183 bool using_proxy = (proxy_info_.is_http() || proxy_info_.is_https()) && | 1183 bool using_proxy = (proxy_info_.is_http() || proxy_info_.is_https()) && |
1184 (request_info_.url.SchemeIs("http") || | 1184 (request_info_.url.SchemeIs("http") || |
1185 request_info_.url.SchemeIs("ftp")); | 1185 request_info_.url.SchemeIs("ftp")); |
1186 if (delegate_->for_websockets()) { | 1186 if (delegate_->for_websockets()) { |
1187 DCHECK_NE(job_type_, PRECONNECT); | 1187 DCHECK_NE(job_type_, PRECONNECT); |
1188 DCHECK(delegate_->websocket_handshake_stream_create_helper()); | 1188 DCHECK(delegate_->websocket_handshake_stream_create_helper()); |
1189 websocket_stream_.reset( | 1189 websocket_stream_.reset( |
1190 delegate_->websocket_handshake_stream_create_helper() | 1190 delegate_->websocket_handshake_stream_create_helper() |
1191 ->CreateBasicStream(std::move(connection_), using_proxy)); | 1191 ->CreateBasicStream(std::move(connection_), using_proxy)); |
1192 } else { | 1192 } else { |
1193 stream_.reset(new HttpBasicStream( | 1193 stream_.reset(new HttpBasicStream(std::move(connection_), using_proxy)); |
1194 std::move(connection_), using_proxy, | |
1195 session_->params().http_09_on_non_default_ports_enabled)); | |
1196 } | 1194 } |
1197 return OK; | 1195 return OK; |
1198 } | 1196 } |
1199 | 1197 |
1200 CHECK(!stream_.get()); | 1198 CHECK(!stream_.get()); |
1201 | 1199 |
1202 bool direct = !IsHttpsProxyAndHttpUrl(); | 1200 bool direct = !IsHttpsProxyAndHttpUrl(); |
1203 if (existing_spdy_session_.get()) { | 1201 if (existing_spdy_session_.get()) { |
1204 // We picked up an existing session, so we don't need our socket. | 1202 // We picked up an existing session, so we don't need our socket. |
1205 if (connection_->socket()) | 1203 if (connection_->socket()) |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1626 | 1624 |
1627 ConnectionAttempts socket_attempts = connection_->connection_attempts(); | 1625 ConnectionAttempts socket_attempts = connection_->connection_attempts(); |
1628 if (connection_->socket()) { | 1626 if (connection_->socket()) { |
1629 connection_->socket()->GetConnectionAttempts(&socket_attempts); | 1627 connection_->socket()->GetConnectionAttempts(&socket_attempts); |
1630 } | 1628 } |
1631 | 1629 |
1632 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); | 1630 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); |
1633 } | 1631 } |
1634 | 1632 |
1635 } // namespace net | 1633 } // namespace net |
OLD | NEW |