| 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 26 matching lines...) Expand all Loading... |
| 37 EXPECT_FALSE(load_timing_info.socket_reused); | 37 EXPECT_FALSE(load_timing_info.socket_reused); |
| 38 | 38 |
| 39 ExpectConnectTimingHasTimes(load_timing_info.connect_timing, | 39 ExpectConnectTimingHasTimes(load_timing_info.connect_timing, |
| 40 CONNECT_TIMING_HAS_CONNECT_TIMES_ONLY); | 40 CONNECT_TIMING_HAS_CONNECT_TIMES_ONLY); |
| 41 ExpectLoadTimingHasOnlyConnectionTimes(load_timing_info); | 41 ExpectLoadTimingHasOnlyConnectionTimes(load_timing_info); |
| 42 } | 42 } |
| 43 | 43 |
| 44 | 44 |
| 45 scoped_refptr<TransportSocketParams> CreateProxyHostParams() { | 45 scoped_refptr<TransportSocketParams> CreateProxyHostParams() { |
| 46 return new TransportSocketParams( | 46 return new TransportSocketParams( |
| 47 HostPortPair("proxy", 80), false, false, | 47 HostPortPair("proxy", 80), false, false, OnHostResolutionCallback(), |
| 48 OnHostResolutionCallback()); | 48 TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT); |
| 49 } | 49 } |
| 50 | 50 |
| 51 scoped_refptr<SOCKSSocketParams> CreateSOCKSv4Params() { | 51 scoped_refptr<SOCKSSocketParams> CreateSOCKSv4Params() { |
| 52 return new SOCKSSocketParams( | 52 return new SOCKSSocketParams( |
| 53 CreateProxyHostParams(), false /* socks_v5 */, | 53 CreateProxyHostParams(), false /* socks_v5 */, |
| 54 HostPortPair("host", 80)); | 54 HostPortPair("host", 80)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 scoped_refptr<SOCKSSocketParams> CreateSOCKSv5Params() { | 57 scoped_refptr<SOCKSSocketParams> CreateSOCKSv5Params() { |
| 58 return new SOCKSSocketParams( | 58 return new SOCKSSocketParams( |
| (...skipping 280 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 |