| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "net/base/net_log.h" | 24 #include "net/base/net_log.h" |
| 25 #include "net/base/net_log_unittest.h" | 25 #include "net/base/net_log_unittest.h" |
| 26 #include "net/base/request_priority.h" | 26 #include "net/base/request_priority.h" |
| 27 #include "net/base/test_completion_callback.h" | 27 #include "net/base/test_completion_callback.h" |
| 28 #include "net/http/http_response_headers.h" | 28 #include "net/http/http_response_headers.h" |
| 29 #include "net/socket/client_socket_factory.h" | 29 #include "net/socket/client_socket_factory.h" |
| 30 #include "net/socket/client_socket_handle.h" | 30 #include "net/socket/client_socket_handle.h" |
| 31 #include "net/socket/client_socket_pool_histograms.h" | 31 #include "net/socket/client_socket_pool_histograms.h" |
| 32 #include "net/socket/socket_test_util.h" | 32 #include "net/socket/socket_test_util.h" |
| 33 #include "net/socket/ssl_client_socket.h" | 33 #include "net/socket/ssl_client_socket.h" |
| 34 #include "net/socket/ssl_host_info.h" |
| 34 #include "net/socket/stream_socket.h" | 35 #include "net/socket/stream_socket.h" |
| 35 #include "net/udp/datagram_client_socket.h" | 36 #include "net/udp/datagram_client_socket.h" |
| 36 #include "testing/gmock/include/gmock/gmock.h" | 37 #include "testing/gmock/include/gmock/gmock.h" |
| 37 #include "testing/gtest/include/gtest/gtest.h" | 38 #include "testing/gtest/include/gtest/gtest.h" |
| 38 | 39 |
| 39 using ::testing::Invoke; | 40 using ::testing::Invoke; |
| 40 using ::testing::Return; | 41 using ::testing::Return; |
| 41 | 42 |
| 42 namespace net { | 43 namespace net { |
| 43 | 44 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 NetLog* /* net_log */, | 203 NetLog* /* net_log */, |
| 203 const NetLog::Source& /*source*/) OVERRIDE { | 204 const NetLog::Source& /*source*/) OVERRIDE { |
| 204 allocation_count_++; | 205 allocation_count_++; |
| 205 return scoped_ptr<StreamSocket>(); | 206 return scoped_ptr<StreamSocket>(); |
| 206 } | 207 } |
| 207 | 208 |
| 208 virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket( | 209 virtual scoped_ptr<SSLClientSocket> CreateSSLClientSocket( |
| 209 scoped_ptr<ClientSocketHandle> transport_socket, | 210 scoped_ptr<ClientSocketHandle> transport_socket, |
| 210 const HostPortPair& host_and_port, | 211 const HostPortPair& host_and_port, |
| 211 const SSLConfig& ssl_config, | 212 const SSLConfig& ssl_config, |
| 213 SSLHostInfo* ssl_host_info, |
| 212 const SSLClientSocketContext& context) OVERRIDE { | 214 const SSLClientSocketContext& context) OVERRIDE { |
| 213 NOTIMPLEMENTED(); | 215 NOTIMPLEMENTED(); |
| 216 delete ssl_host_info; |
| 214 return scoped_ptr<SSLClientSocket>(); | 217 return scoped_ptr<SSLClientSocket>(); |
| 215 } | 218 } |
| 216 | 219 |
| 217 virtual void ClearSSLSessionCache() OVERRIDE { | 220 virtual void ClearSSLSessionCache() OVERRIDE { |
| 218 NOTIMPLEMENTED(); | 221 NOTIMPLEMENTED(); |
| 219 } | 222 } |
| 220 | 223 |
| 221 void WaitForSignal(TestConnectJob* job) { waiting_jobs_.push_back(job); } | 224 void WaitForSignal(TestConnectJob* job) { waiting_jobs_.push_back(job); } |
| 222 | 225 |
| 223 void SignalJobs(); | 226 void SignalJobs(); |
| (...skipping 3834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4058 request(1)->handle()->Reset(); | 4061 request(1)->handle()->Reset(); |
| 4059 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a")); | 4062 ASSERT_EQ(1, pool_->NumConnectJobsInGroup("a")); |
| 4060 | 4063 |
| 4061 EXPECT_EQ(OK, request(2)->WaitForResult()); | 4064 EXPECT_EQ(OK, request(2)->WaitForResult()); |
| 4062 EXPECT_FALSE(request(1)->have_result()); | 4065 EXPECT_FALSE(request(1)->have_result()); |
| 4063 } | 4066 } |
| 4064 | 4067 |
| 4065 } // namespace | 4068 } // namespace |
| 4066 | 4069 |
| 4067 } // namespace net | 4070 } // namespace net |
| OLD | NEW |