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, NULL) {} | 285 connect_job_factory) {} |
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 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1482 TestReleasingSocketRequest request(pool_.get()); | 1482 TestReleasingSocketRequest request(pool_.get()); |
1483 EXPECT_EQ(ERR_IO_PENDING, InitHandle(request.handle(), "a", kDefaultPriority, | 1483 EXPECT_EQ(ERR_IO_PENDING, InitHandle(request.handle(), "a", kDefaultPriority, |
1484 &request, pool_, NULL)); | 1484 &request, pool_, NULL)); |
1485 | 1485 |
1486 EXPECT_EQ(OK, request.WaitForResult()); | 1486 EXPECT_EQ(OK, request.WaitForResult()); |
1487 } | 1487 } |
1488 | 1488 |
1489 } // namespace | 1489 } // namespace |
1490 | 1490 |
1491 } // namespace net | 1491 } // namespace net |
OLD | NEW |