| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 } | 79 } |
| 80 | 80 |
| 81 bool ReleaseOneConnection(ClientSocketPoolTest::KeepAlive keep_alive) { | 81 bool ReleaseOneConnection(ClientSocketPoolTest::KeepAlive keep_alive) { |
| 82 return test_base_.ReleaseOneConnection(keep_alive); | 82 return test_base_.ReleaseOneConnection(keep_alive); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void ReleaseAllConnections(ClientSocketPoolTest::KeepAlive keep_alive) { | 85 void ReleaseAllConnections(ClientSocketPoolTest::KeepAlive keep_alive) { |
| 86 test_base_.ReleaseAllConnections(keep_alive); | 86 test_base_.ReleaseAllConnections(keep_alive); |
| 87 } | 87 } |
| 88 | 88 |
| 89 ScopedVector<TestSocketRequest>* requests() { return test_base_.requests(); } | 89 std::vector<scoped_ptr<TestSocketRequest>>* requests() { |
| 90 return test_base_.requests(); |
| 91 } |
| 90 size_t completion_count() const { return test_base_.completion_count(); } | 92 size_t completion_count() const { return test_base_.completion_count(); } |
| 91 | 93 |
| 92 bool connect_backup_jobs_enabled_; | 94 bool connect_backup_jobs_enabled_; |
| 93 TestNetLog net_log_; | 95 TestNetLog net_log_; |
| 94 scoped_refptr<TransportSocketParams> params_; | 96 scoped_refptr<TransportSocketParams> params_; |
| 95 scoped_ptr<MockHostResolver> host_resolver_; | 97 scoped_ptr<MockHostResolver> host_resolver_; |
| 96 MockTransportClientSocketFactory client_socket_factory_; | 98 MockTransportClientSocketFactory client_socket_factory_; |
| 97 TransportClientSocketPool pool_; | 99 TransportClientSocketPool pool_; |
| 98 ClientSocketPoolTest test_base_; | 100 ClientSocketPoolTest test_base_; |
| 99 | 101 |
| (...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 handle.socket()->GetLocalAddress(&endpoint); | 1128 handle.socket()->GetLocalAddress(&endpoint); |
| 1127 EXPECT_EQ(kIPv6AddressSize, endpoint.address().size()); | 1129 EXPECT_EQ(kIPv6AddressSize, endpoint.address().size()); |
| 1128 EXPECT_EQ(1, client_socket_factory_.allocation_count()); | 1130 EXPECT_EQ(1, client_socket_factory_.allocation_count()); |
| 1129 // Verify that TCP FastOpen was not turned on for the socket. | 1131 // Verify that TCP FastOpen was not turned on for the socket. |
| 1130 EXPECT_FALSE(handle.socket()->UsingTCPFastOpen()); | 1132 EXPECT_FALSE(handle.socket()->UsingTCPFastOpen()); |
| 1131 } | 1133 } |
| 1132 | 1134 |
| 1133 } // namespace | 1135 } // namespace |
| 1134 | 1136 |
| 1135 } // namespace net | 1137 } // namespace net |
| OLD | NEW |