| 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 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 bool using_proxy = (proxy_info_.is_http() || proxy_info_.is_https()) && | 1150 bool using_proxy = (proxy_info_.is_http() || proxy_info_.is_https()) && |
| 1151 (request_info_.url.SchemeIs("http") || | 1151 (request_info_.url.SchemeIs("http") || |
| 1152 request_info_.url.SchemeIs("ftp")); | 1152 request_info_.url.SchemeIs("ftp")); |
| 1153 if (delegate_->for_websockets()) { | 1153 if (delegate_->for_websockets()) { |
| 1154 DCHECK_NE(job_type_, PRECONNECT); | 1154 DCHECK_NE(job_type_, PRECONNECT); |
| 1155 DCHECK(delegate_->websocket_handshake_stream_create_helper()); | 1155 DCHECK(delegate_->websocket_handshake_stream_create_helper()); |
| 1156 websocket_stream_.reset( | 1156 websocket_stream_.reset( |
| 1157 delegate_->websocket_handshake_stream_create_helper() | 1157 delegate_->websocket_handshake_stream_create_helper() |
| 1158 ->CreateBasicStream(std::move(connection_), using_proxy)); | 1158 ->CreateBasicStream(std::move(connection_), using_proxy)); |
| 1159 } else { | 1159 } else { |
| 1160 stream_.reset(new HttpBasicStream(connection_.release(), using_proxy)); | 1160 stream_.reset(new HttpBasicStream(std::move(connection_), using_proxy)); |
| 1161 } | 1161 } |
| 1162 return OK; | 1162 return OK; |
| 1163 } | 1163 } |
| 1164 | 1164 |
| 1165 CHECK(!stream_.get()); | 1165 CHECK(!stream_.get()); |
| 1166 | 1166 |
| 1167 bool direct = !IsHttpsProxyAndHttpUrl(); | 1167 bool direct = !IsHttpsProxyAndHttpUrl(); |
| 1168 if (existing_spdy_session_.get()) { | 1168 if (existing_spdy_session_.get()) { |
| 1169 // We picked up an existing session, so we don't need our socket. | 1169 // We picked up an existing session, so we don't need our socket. |
| 1170 if (connection_->socket()) | 1170 if (connection_->socket()) |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1527 | 1527 |
| 1528 ConnectionAttempts socket_attempts = connection_->connection_attempts(); | 1528 ConnectionAttempts socket_attempts = connection_->connection_attempts(); |
| 1529 if (connection_->socket()) { | 1529 if (connection_->socket()) { |
| 1530 connection_->socket()->GetConnectionAttempts(&socket_attempts); | 1530 connection_->socket()->GetConnectionAttempts(&socket_attempts); |
| 1531 } | 1531 } |
| 1532 | 1532 |
| 1533 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); | 1533 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); |
| 1534 } | 1534 } |
| 1535 | 1535 |
| 1536 } // namespace net | 1536 } // namespace net |
| OLD | NEW |