| 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 public: | 286 public: |
| 287 TestClientSocketPool( | 287 TestClientSocketPool( |
| 288 int max_sockets, | 288 int max_sockets, |
| 289 int max_sockets_per_group, | 289 int max_sockets_per_group, |
| 290 const scoped_refptr<ClientSocketPoolHistograms>& histograms, | 290 const scoped_refptr<ClientSocketPoolHistograms>& histograms, |
| 291 base::TimeDelta unused_idle_socket_timeout, | 291 base::TimeDelta unused_idle_socket_timeout, |
| 292 base::TimeDelta used_idle_socket_timeout, | 292 base::TimeDelta used_idle_socket_timeout, |
| 293 TestClientSocketPoolBase::ConnectJobFactory* connect_job_factory) | 293 TestClientSocketPoolBase::ConnectJobFactory* connect_job_factory) |
| 294 : base_(max_sockets, max_sockets_per_group, histograms, | 294 : base_(max_sockets, max_sockets_per_group, histograms, |
| 295 unused_idle_socket_timeout, used_idle_socket_timeout, | 295 unused_idle_socket_timeout, used_idle_socket_timeout, |
| 296 connect_job_factory, NULL) {} | 296 connect_job_factory) {} |
| 297 | 297 |
| 298 virtual int RequestSocket( | 298 virtual int RequestSocket( |
| 299 const std::string& group_name, | 299 const std::string& group_name, |
| 300 const void* params, | 300 const void* params, |
| 301 net::RequestPriority priority, | 301 net::RequestPriority priority, |
| 302 ClientSocketHandle* handle, | 302 ClientSocketHandle* handle, |
| 303 CompletionCallback* callback, | 303 CompletionCallback* callback, |
| 304 const BoundNetLog& net_log) { | 304 const BoundNetLog& net_log) { |
| 305 const TestSocketParams* casted_socket_params = | 305 const TestSocketParams* casted_socket_params = |
| 306 static_cast<const TestSocketParams*>(params); | 306 static_cast<const TestSocketParams*>(params); |
| (...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1780 EXPECT_EQ(ERR_IO_PENDING, | 1780 EXPECT_EQ(ERR_IO_PENDING, |
| 1781 InitHandle(&handle, "a", kDefaultPriority, | 1781 InitHandle(&handle, "a", kDefaultPriority, |
| 1782 &callback, pool_, BoundNetLog())); | 1782 &callback, pool_, BoundNetLog())); |
| 1783 EXPECT_EQ(OK, callback.WaitForResult()); | 1783 EXPECT_EQ(OK, callback.WaitForResult()); |
| 1784 EXPECT_EQ(ClientSocketHandle::UNUSED, handle.reuse_type()); | 1784 EXPECT_EQ(ClientSocketHandle::UNUSED, handle.reuse_type()); |
| 1785 } | 1785 } |
| 1786 | 1786 |
| 1787 } // namespace | 1787 } // namespace |
| 1788 | 1788 |
| 1789 } // namespace net | 1789 } // namespace net |
| OLD | NEW |