Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: net/socket/transport_client_socket_pool_unittest.cc

Issue 1459633003: Remove ScopedVector from net/socket tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698