| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/base/socket_test_util.h" | 5 #include "net/socket/socket_test_util.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
| 11 #include "net/base/socket.h" | |
| 12 #include "net/base/ssl_client_socket.h" | |
| 13 #include "net/base/ssl_info.h" | 11 #include "net/base/ssl_info.h" |
| 12 #include "net/socket/socket.h" |
| 13 #include "net/socket/ssl_client_socket.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 class MockClientSocket : public net::SSLClientSocket { | 18 class MockClientSocket : public net::SSLClientSocket { |
| 19 public: | 19 public: |
| 20 MockClientSocket(); | 20 MockClientSocket(); |
| 21 | 21 |
| 22 // ClientSocket methods: | 22 // ClientSocket methods: |
| 23 virtual int Connect(net::CompletionCallback* callback) = 0; | 23 virtual int Connect(net::CompletionCallback* callback) = 0; |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 | 370 |
| 371 SSLClientSocket* MockClientSocketFactory::CreateSSLClientSocket( | 371 SSLClientSocket* MockClientSocketFactory::CreateSSLClientSocket( |
| 372 ClientSocket* transport_socket, | 372 ClientSocket* transport_socket, |
| 373 const std::string& hostname, | 373 const std::string& hostname, |
| 374 const SSLConfig& ssl_config) { | 374 const SSLConfig& ssl_config) { |
| 375 return new MockSSLClientSocket(transport_socket, hostname, ssl_config, | 375 return new MockSSLClientSocket(transport_socket, hostname, ssl_config, |
| 376 mock_ssl_sockets_.GetNext()); | 376 mock_ssl_sockets_.GetNext()); |
| 377 } | 377 } |
| 378 | 378 |
| 379 } // namespace net | 379 } // namespace net |
| OLD | NEW |