| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/platform_thread.h" | 9 #include "base/platform_thread.h" |
| 10 #include "base/scoped_vector.h" | 10 #include "base/scoped_vector.h" |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 | 320 |
| 321 const TestClientSocketPoolBase* base() const { return &base_; } | 321 const TestClientSocketPoolBase* base() const { return &base_; } |
| 322 | 322 |
| 323 int NumConnectJobsInGroup(const std::string& group_name) const { | 323 int NumConnectJobsInGroup(const std::string& group_name) const { |
| 324 return base_.NumConnectJobsInGroup(group_name); | 324 return base_.NumConnectJobsInGroup(group_name); |
| 325 } | 325 } |
| 326 | 326 |
| 327 void CleanupTimedOutIdleSockets() { base_.CleanupIdleSockets(false); } | 327 void CleanupTimedOutIdleSockets() { base_.CleanupIdleSockets(false); } |
| 328 | 328 |
| 329 private: | 329 private: |
| 330 ~TestClientSocketPool() {} |
| 331 |
| 330 TestClientSocketPoolBase base_; | 332 TestClientSocketPoolBase base_; |
| 331 | 333 |
| 332 DISALLOW_COPY_AND_ASSIGN(TestClientSocketPool); | 334 DISALLOW_COPY_AND_ASSIGN(TestClientSocketPool); |
| 333 }; | 335 }; |
| 334 | 336 |
| 335 } // namespace | 337 } // namespace |
| 336 | 338 |
| 337 REGISTER_SOCKET_PARAMS_FOR_POOL(TestClientSocketPool, const void*); | 339 REGISTER_SOCKET_PARAMS_FOR_POOL(TestClientSocketPool, const void*); |
| 338 | 340 |
| 339 namespace { | 341 namespace { |
| (...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1868 | 1870 |
| 1869 pool_->CleanupTimedOutIdleSockets(); | 1871 pool_->CleanupTimedOutIdleSockets(); |
| 1870 rv = InitHandle(req.handle(), "a", 0, &req, pool_.get(), NULL); | 1872 rv = InitHandle(req.handle(), "a", 0, &req, pool_.get(), NULL); |
| 1871 EXPECT_EQ(OK, rv); | 1873 EXPECT_EQ(OK, rv); |
| 1872 EXPECT_TRUE(req.handle()->is_reused()); | 1874 EXPECT_TRUE(req.handle()->is_reused()); |
| 1873 } | 1875 } |
| 1874 | 1876 |
| 1875 } // namespace | 1877 } // namespace |
| 1876 | 1878 |
| 1877 } // namespace net | 1879 } // namespace net |
| OLD | NEW |