Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: net/spdy/spdy_proxy_client_socket_unittest.cc

Issue 1060883002: Remove the confusing request_url argument from the constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/spdy/spdy_proxy_client_socket.h" 5 #include "net/spdy/spdy_proxy_client_socket.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "net/base/address_list.h" 10 #include "net/base/address_list.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 spdy_session_ = 192 spdy_session_ =
193 CreateInsecureSpdySession( 193 CreateInsecureSpdySession(
194 session_, endpoint_spdy_session_key_, BoundNetLog()); 194 session_, endpoint_spdy_session_key_, BoundNetLog());
195 base::WeakPtr<SpdyStream> spdy_stream( 195 base::WeakPtr<SpdyStream> spdy_stream(
196 CreateStreamSynchronously( 196 CreateStreamSynchronously(
197 SPDY_BIDIRECTIONAL_STREAM, spdy_session_, url_, LOWEST, 197 SPDY_BIDIRECTIONAL_STREAM, spdy_session_, url_, LOWEST,
198 net_log_.bound())); 198 net_log_.bound()));
199 ASSERT_TRUE(spdy_stream.get() != NULL); 199 ASSERT_TRUE(spdy_stream.get() != NULL);
200 200
201 // Create the SpdyProxyClientSocket. 201 // Create the SpdyProxyClientSocket.
202 sock_.reset( 202 sock_.reset(new SpdyProxyClientSocket(
203 new SpdyProxyClientSocket(spdy_stream, user_agent_, 203 spdy_stream, user_agent_, endpoint_host_port_pair_, proxy_host_port_,
204 endpoint_host_port_pair_, url_, 204 net_log_.bound(), session_->http_auth_cache(),
205 proxy_host_port_, net_log_.bound(), 205 session_->http_auth_handler_factory()));
206 session_->http_auth_cache(),
207 session_->http_auth_handler_factory()));
208 } 206 }
209 207
210 scoped_refptr<IOBufferWithSize> SpdyProxyClientSocketTest::CreateBuffer( 208 scoped_refptr<IOBufferWithSize> SpdyProxyClientSocketTest::CreateBuffer(
211 const char* data, int size) { 209 const char* data, int size) {
212 scoped_refptr<IOBufferWithSize> buf(new IOBufferWithSize(size)); 210 scoped_refptr<IOBufferWithSize> buf(new IOBufferWithSize(size));
213 memcpy(buf->data(), data, size); 211 memcpy(buf->data(), data, size);
214 return buf; 212 return buf;
215 } 213 }
216 214
217 void SpdyProxyClientSocketTest::AssertConnectSucceeds() { 215 void SpdyProxyClientSocketTest::AssertConnectSucceeds() {
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 1372
1375 EXPECT_FALSE(sock_.get()); 1373 EXPECT_FALSE(sock_.get());
1376 EXPECT_TRUE(read_callback.have_result()); 1374 EXPECT_TRUE(read_callback.have_result());
1377 EXPECT_FALSE(write_callback_.have_result()); 1375 EXPECT_FALSE(write_callback_.have_result());
1378 1376
1379 // Let the RST_STREAM write while |rst| is in-scope. 1377 // Let the RST_STREAM write while |rst| is in-scope.
1380 base::MessageLoop::current()->RunUntilIdle(); 1378 base::MessageLoop::current()->RunUntilIdle();
1381 } 1379 }
1382 1380
1383 } // namespace net 1381 } // namespace net
OLDNEW
« net/http/http_proxy_client_socket.cc ('K') | « net/spdy/spdy_proxy_client_socket.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698