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/transport_client_socket_pool.h" | 5 #include "net/socket/transport_client_socket_pool.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 host_resolver_(new MockHostResolver), | 50 host_resolver_(new MockHostResolver), |
51 client_socket_factory_(&net_log_), | 51 client_socket_factory_(&net_log_), |
52 pool_(kMaxSockets, | 52 pool_(kMaxSockets, |
53 kMaxSocketsPerGroup, | 53 kMaxSocketsPerGroup, |
54 histograms_.get(), | 54 histograms_.get(), |
55 host_resolver_.get(), | 55 host_resolver_.get(), |
56 &client_socket_factory_, | 56 &client_socket_factory_, |
57 NULL) { | 57 NULL) { |
58 } | 58 } |
59 | 59 |
60 virtual ~TransportClientSocketPoolTest() { | 60 ~TransportClientSocketPoolTest() override { |
61 internal::ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled( | 61 internal::ClientSocketPoolBaseHelper::set_connect_backup_jobs_enabled( |
62 connect_backup_jobs_enabled_); | 62 connect_backup_jobs_enabled_); |
63 } | 63 } |
64 | 64 |
65 scoped_refptr<TransportSocketParams> CreateParamsForTCPFastOpen() { | 65 scoped_refptr<TransportSocketParams> CreateParamsForTCPFastOpen() { |
66 return new TransportSocketParams(HostPortPair("www.google.com", 80), | 66 return new TransportSocketParams(HostPortPair("www.google.com", 80), |
67 false, false, OnHostResolutionCallback(), | 67 false, false, OnHostResolutionCallback(), |
68 TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DESIRED); | 68 TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DESIRED); |
69 } | 69 } |
70 | 70 |
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 handle.socket()->GetLocalAddress(&endpoint); | 1103 handle.socket()->GetLocalAddress(&endpoint); |
1104 EXPECT_EQ(kIPv6AddressSize, endpoint.address().size()); | 1104 EXPECT_EQ(kIPv6AddressSize, endpoint.address().size()); |
1105 EXPECT_EQ(1, client_socket_factory_.allocation_count()); | 1105 EXPECT_EQ(1, client_socket_factory_.allocation_count()); |
1106 // Verify that TCP FastOpen was not turned on for the socket. | 1106 // Verify that TCP FastOpen was not turned on for the socket. |
1107 EXPECT_FALSE(handle.socket()->UsingTCPFastOpen()); | 1107 EXPECT_FALSE(handle.socket()->UsingTCPFastOpen()); |
1108 } | 1108 } |
1109 | 1109 |
1110 } // namespace | 1110 } // namespace |
1111 | 1111 |
1112 } // namespace net | 1112 } // namespace net |
OLD | NEW |