| OLD | NEW | 
|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/socket/client_socket_pool_base.h" | 5 #include "net/socket/client_socket_pool_base.h" | 
| 6 | 6 | 
| 7 #include "base/callback.h" | 7 #include "base/callback.h" | 
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" | 
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" | 
| 10 #include "base/platform_thread.h" | 10 #include "base/platform_thread.h" | 
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 275  public: | 275  public: | 
| 276   TestClientSocketPool( | 276   TestClientSocketPool( | 
| 277       int max_sockets, | 277       int max_sockets, | 
| 278       int max_sockets_per_group, | 278       int max_sockets_per_group, | 
| 279       const std::string& name, | 279       const std::string& name, | 
| 280       base::TimeDelta unused_idle_socket_timeout, | 280       base::TimeDelta unused_idle_socket_timeout, | 
| 281       base::TimeDelta used_idle_socket_timeout, | 281       base::TimeDelta used_idle_socket_timeout, | 
| 282       TestClientSocketPoolBase::ConnectJobFactory* connect_job_factory) | 282       TestClientSocketPoolBase::ConnectJobFactory* connect_job_factory) | 
| 283       : base_(max_sockets, max_sockets_per_group, name, | 283       : base_(max_sockets, max_sockets_per_group, name, | 
| 284               unused_idle_socket_timeout, used_idle_socket_timeout, | 284               unused_idle_socket_timeout, used_idle_socket_timeout, | 
| 285               connect_job_factory) {} | 285               connect_job_factory, NULL) {} | 
| 286 | 286 | 
| 287   virtual int RequestSocket( | 287   virtual int RequestSocket( | 
| 288       const std::string& group_name, | 288       const std::string& group_name, | 
| 289       const void* params, | 289       const void* params, | 
| 290       net::RequestPriority priority, | 290       net::RequestPriority priority, | 
| 291       ClientSocketHandle* handle, | 291       ClientSocketHandle* handle, | 
| 292       CompletionCallback* callback, | 292       CompletionCallback* callback, | 
| 293       const BoundNetLog& net_log) { | 293       const BoundNetLog& net_log) { | 
| 294     return base_.RequestSocket( | 294     return base_.RequestSocket( | 
| 295         group_name, params, priority, handle, callback, net_log); | 295         group_name, params, priority, handle, callback, net_log); | 
| (...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1509   TestReleasingSocketRequest request(pool_.get()); | 1509   TestReleasingSocketRequest request(pool_.get()); | 
| 1510   EXPECT_EQ(ERR_IO_PENDING, InitHandle(request.handle(), "a", kDefaultPriority, | 1510   EXPECT_EQ(ERR_IO_PENDING, InitHandle(request.handle(), "a", kDefaultPriority, | 
| 1511                                        &request, pool_, NULL)); | 1511                                        &request, pool_, NULL)); | 
| 1512 | 1512 | 
| 1513   EXPECT_EQ(OK, request.WaitForResult()); | 1513   EXPECT_EQ(OK, request.WaitForResult()); | 
| 1514 } | 1514 } | 
| 1515 | 1515 | 
| 1516 }  // namespace | 1516 }  // namespace | 
| 1517 | 1517 | 
| 1518 }  // namespace net | 1518 }  // namespace net | 
| OLD | NEW | 
|---|