From a937a06d92a426395c006ef8437e57db6be928be Mon Sep 17 00:00:00 2001 From: "willchan@chromium.org" Date: Wed, 19 Aug 2009 21:19:24 +0000 Subject: Make ClientSocketHandle::Init() typesafe. Introduce a REGISTER_SOCKET_PARAMS_FOR_POOL macro to register valid SocketParams for a ClientSocketPool subtype. Update HttpNetworkSession's ClientSocketPool to return the concrete TCPClientSocketPool instead of the parent interface. Renamed the member variable&accessor. Updated tests. BUG=http://crbug.com/13289 Review URL: http://codereview.chromium.org/173018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23743 0039d316-1c4b-4281-b951-d872f2087c98 --- net/socket/socket_test_util.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'net/socket/socket_test_util.h') diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h index 8307d44..76d4df1f 100644 --- a/net/socket/socket_test_util.h +++ b/net/socket/socket_test_util.h @@ -329,22 +329,20 @@ class ClientSocketPoolTest : public testing::Test { static const int kIndexOutOfBounds; static const int kRequestNotFound; - ClientSocketPoolTest() : ignored_request_info_("ignored", 80) { - } - virtual void SetUp(); virtual void TearDown(); - template + template int StartRequestUsingPool(PoolType* socket_pool, const std::string& group_name, - int priority) { + int priority, + const SocketParams& socket_params) { DCHECK(socket_pool); TestSocketRequest* request = new TestSocketRequest(&request_order_, &completion_count_); requests_.push_back(request); int rv = request->handle()->Init( - group_name, ignored_request_info_, priority, request, + group_name, socket_params, priority, request, socket_pool, NULL); if (rv != ERR_IO_PENDING) request_order_.push_back(request); @@ -364,7 +362,6 @@ class ClientSocketPoolTest : public testing::Test { // Releases connections until there is nothing to release. void ReleaseAllConnections(KeepAlive keep_alive); - HostResolver::RequestInfo ignored_request_info_; ScopedVector requests_; std::vector request_order_; size_t completion_count_; -- cgit v1.1