| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/socks_client_socket_pool.h" | 5 #include "net/socket/socks_client_socket_pool.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/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "net/base/load_timing_info.h" | 10 #include "net/base/load_timing_info.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 SOCKSClientSocketPoolTest() | 91 SOCKSClientSocketPoolTest() |
| 92 : transport_socket_pool_(kMaxSockets, | 92 : transport_socket_pool_(kMaxSockets, |
| 93 kMaxSocketsPerGroup, | 93 kMaxSocketsPerGroup, |
| 94 &transport_client_socket_factory_), | 94 &transport_client_socket_factory_), |
| 95 pool_(kMaxSockets, | 95 pool_(kMaxSockets, |
| 96 kMaxSocketsPerGroup, | 96 kMaxSocketsPerGroup, |
| 97 &host_resolver_, | 97 &host_resolver_, |
| 98 &transport_socket_pool_, | 98 &transport_socket_pool_, |
| 99 NULL, |
| 99 NULL) {} | 100 NULL) {} |
| 100 | 101 |
| 101 ~SOCKSClientSocketPoolTest() override {} | 102 ~SOCKSClientSocketPoolTest() override {} |
| 102 | 103 |
| 103 int StartRequestV5(const std::string& group_name, RequestPriority priority) { | 104 int StartRequestV5(const std::string& group_name, RequestPriority priority) { |
| 104 return test_base_.StartRequestUsingPool( | 105 return test_base_.StartRequestUsingPool( |
| 105 &pool_, group_name, priority, ClientSocketPool::RespectLimits::ENABLED, | 106 &pool_, group_name, priority, ClientSocketPool::RespectLimits::ENABLED, |
| 106 CreateSOCKSv5Params()); | 107 CreateSOCKSv5Params()); |
| 107 } | 108 } |
| 108 | 109 |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 | 343 |
| 343 (*requests())[0]->handle()->Reset(); | 344 (*requests())[0]->handle()->Reset(); |
| 344 (*requests())[1]->handle()->Reset(); | 345 (*requests())[1]->handle()->Reset(); |
| 345 } | 346 } |
| 346 | 347 |
| 347 // It would be nice to also test the timeouts in SOCKSClientSocketPool. | 348 // It would be nice to also test the timeouts in SOCKSClientSocketPool. |
| 348 | 349 |
| 349 } // namespace | 350 } // namespace |
| 350 | 351 |
| 351 } // namespace net | 352 } // namespace net |
| OLD | NEW |