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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 &transport_histograms_, | 96 &transport_histograms_, |
97 &transport_client_socket_factory_), | 97 &transport_client_socket_factory_), |
98 socks_histograms_("SOCKSUnitTest"), | 98 socks_histograms_("SOCKSUnitTest"), |
99 pool_(kMaxSockets, kMaxSocketsPerGroup, | 99 pool_(kMaxSockets, kMaxSocketsPerGroup, |
100 &socks_histograms_, | 100 &socks_histograms_, |
101 &host_resolver_, | 101 &host_resolver_, |
102 &transport_socket_pool_, | 102 &transport_socket_pool_, |
103 NULL) { | 103 NULL) { |
104 } | 104 } |
105 | 105 |
106 virtual ~SOCKSClientSocketPoolTest() {} | 106 ~SOCKSClientSocketPoolTest() override {} |
107 | 107 |
108 int StartRequestV5(const std::string& group_name, RequestPriority priority) { | 108 int StartRequestV5(const std::string& group_name, RequestPriority priority) { |
109 return test_base_.StartRequestUsingPool( | 109 return test_base_.StartRequestUsingPool( |
110 &pool_, group_name, priority, CreateSOCKSv5Params()); | 110 &pool_, group_name, priority, CreateSOCKSv5Params()); |
111 } | 111 } |
112 | 112 |
113 int GetOrderOfRequest(size_t index) const { | 113 int GetOrderOfRequest(size_t index) const { |
114 return test_base_.GetOrderOfRequest(index); | 114 return test_base_.GetOrderOfRequest(index); |
115 } | 115 } |
116 | 116 |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 339 |
340 (*requests())[0]->handle()->Reset(); | 340 (*requests())[0]->handle()->Reset(); |
341 (*requests())[1]->handle()->Reset(); | 341 (*requests())[1]->handle()->Reset(); |
342 } | 342 } |
343 | 343 |
344 // It would be nice to also test the timeouts in SOCKSClientSocketPool. | 344 // It would be nice to also test the timeouts in SOCKSClientSocketPool. |
345 | 345 |
346 } // namespace | 346 } // namespace |
347 | 347 |
348 } // namespace net | 348 } // namespace net |
OLD | NEW |