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/client_socket_pool_base.h" | 5 #include "net/socket/client_socket_pool_base.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 bool ReleaseOneConnection(ClientSocketPoolTest::KeepAlive keep_alive) { | 719 bool ReleaseOneConnection(ClientSocketPoolTest::KeepAlive keep_alive) { |
720 return test_base_.ReleaseOneConnection(keep_alive); | 720 return test_base_.ReleaseOneConnection(keep_alive); |
721 } | 721 } |
722 | 722 |
723 void ReleaseAllConnections(ClientSocketPoolTest::KeepAlive keep_alive) { | 723 void ReleaseAllConnections(ClientSocketPoolTest::KeepAlive keep_alive) { |
724 test_base_.ReleaseAllConnections(keep_alive); | 724 test_base_.ReleaseAllConnections(keep_alive); |
725 } | 725 } |
726 | 726 |
727 TestSocketRequest* request(int i) { return test_base_.request(i); } | 727 TestSocketRequest* request(int i) { return test_base_.request(i); } |
728 size_t requests_size() const { return test_base_.requests_size(); } | 728 size_t requests_size() const { return test_base_.requests_size(); } |
729 ScopedVector<TestSocketRequest>* requests() { return test_base_.requests(); } | 729 std::vector<scoped_ptr<TestSocketRequest>>* requests() { |
| 730 return test_base_.requests(); |
| 731 } |
730 size_t completion_count() const { return test_base_.completion_count(); } | 732 size_t completion_count() const { return test_base_.completion_count(); } |
731 | 733 |
732 TestNetLog net_log_; | 734 TestNetLog net_log_; |
733 bool connect_backup_jobs_enabled_; | 735 bool connect_backup_jobs_enabled_; |
734 bool cleanup_timer_enabled_; | 736 bool cleanup_timer_enabled_; |
735 MockClientSocketFactory client_socket_factory_; | 737 MockClientSocketFactory client_socket_factory_; |
736 TestConnectJobFactory* connect_job_factory_; | 738 TestConnectJobFactory* connect_job_factory_; |
737 scoped_refptr<TestSocketParams> params_; | 739 scoped_refptr<TestSocketParams> params_; |
738 scoped_ptr<TestClientSocketPool> pool_; | 740 scoped_ptr<TestClientSocketPool> pool_; |
739 ClientSocketPoolTest test_base_; | 741 ClientSocketPoolTest test_base_; |
(...skipping 3338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4078 request(1)->handle()->Reset(); | 4080 request(1)->handle()->Reset(); |
4079 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a")); | 4081 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a")); |
4080 | 4082 |
4081 EXPECT_EQ(OK, request(2)->WaitForResult()); | 4083 EXPECT_EQ(OK, request(2)->WaitForResult()); |
4082 EXPECT_FALSE(request(1)->have_result()); | 4084 EXPECT_FALSE(request(1)->have_result()); |
4083 } | 4085 } |
4084 | 4086 |
4085 } // namespace | 4087 } // namespace |
4086 | 4088 |
4087 } // namespace net | 4089 } // namespace net |
OLD | NEW |