OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/spdy/spdy_proxy_client_socket.h" | 5 #include "net/spdy/spdy_proxy_client_socket.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "net/base/address_list.h" | 8 #include "net/base/address_list.h" |
9 #include "net/base/net_log.h" | 9 #include "net/base/net_log.h" |
10 #include "net/base/net_log_unittest.h" | 10 #include "net/base/net_log_unittest.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // Creates a new spdy session | 177 // Creates a new spdy session |
178 spdy_session_ = | 178 spdy_session_ = |
179 session_->spdy_session_pool()->Get(endpoint_host_port_proxy_pair_, | 179 session_->spdy_session_pool()->Get(endpoint_host_port_proxy_pair_, |
180 BoundNetLog()); | 180 BoundNetLog()); |
181 | 181 |
182 // Perform the TCP connect | 182 // Perform the TCP connect |
183 scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle); | 183 scoped_ptr<ClientSocketHandle> connection(new ClientSocketHandle); |
184 EXPECT_EQ(OK, | 184 EXPECT_EQ(OK, |
185 connection->Init(endpoint_host_port_pair_.ToString(), | 185 connection->Init(endpoint_host_port_pair_.ToString(), |
186 transport_params_, | 186 transport_params_, |
187 LOWEST, NULL, session_->transport_socket_pool(), | 187 LOWEST, NULL, session_->GetTransportSocketPool(), |
188 BoundNetLog())); | 188 BoundNetLog())); |
189 spdy_session_->InitializeWithSocket(connection.release(), false, OK); | 189 spdy_session_->InitializeWithSocket(connection.release(), false, OK); |
190 | 190 |
191 // Create the SPDY Stream | 191 // Create the SPDY Stream |
192 ASSERT_EQ( | 192 ASSERT_EQ( |
193 OK, | 193 OK, |
194 spdy_session_->CreateStream(url_, LOWEST, &spdy_stream_, BoundNetLog(), | 194 spdy_session_->CreateStream(url_, LOWEST, &spdy_stream_, BoundNetLog(), |
195 NULL)); | 195 NULL)); |
196 | 196 |
197 // Create the SpdyProxyClientSocket | 197 // Create the SpdyProxyClientSocket |
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1162 scoped_refptr<IOBuffer> buf(new IOBuffer(kLen1)); | 1162 scoped_refptr<IOBuffer> buf(new IOBuffer(kLen1)); |
1163 ASSERT_EQ(ERR_IO_PENDING, sock_->Read(buf, kLen1, &read_callback_)); | 1163 ASSERT_EQ(ERR_IO_PENDING, sock_->Read(buf, kLen1, &read_callback_)); |
1164 | 1164 |
1165 sock_->Disconnect(); | 1165 sock_->Disconnect(); |
1166 | 1166 |
1167 EXPECT_FALSE(sock_->IsConnected()); | 1167 EXPECT_FALSE(sock_->IsConnected()); |
1168 EXPECT_FALSE(read_callback_.have_result()); | 1168 EXPECT_FALSE(read_callback_.have_result()); |
1169 } | 1169 } |
1170 | 1170 |
1171 } // namespace net | 1171 } // namespace net |
OLD | NEW |