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 #ifndef NET_BASE_SOCKET_TEST_UTIL_H_ | 5 #ifndef NET_SOCKET_SOCKET_TEST_UTIL_H_ |
6 #define NET_BASE_SOCKET_TEST_UTIL_H_ | 6 #define NET_SOCKET_SOCKET_TEST_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "net/base/address_list.h" | 13 #include "net/base/address_list.h" |
14 #include "net/base/client_socket_factory.h" | |
15 #include "net/base/net_errors.h" | 14 #include "net/base/net_errors.h" |
16 #include "net/base/ssl_config_service.h" | 15 #include "net/base/ssl_config_service.h" |
| 16 #include "net/socket/client_socket_factory.h" |
17 | 17 |
18 namespace net { | 18 namespace net { |
19 | 19 |
20 class ClientSocket; | 20 class ClientSocket; |
21 class SSLClientSocket; | 21 class SSLClientSocket; |
22 | 22 |
23 struct MockConnect { | 23 struct MockConnect { |
24 // Asynchronous connection success. | 24 // Asynchronous connection success. |
25 MockConnect() : async(true), result(OK) { } | 25 MockConnect() : async(true), result(OK) { } |
26 MockConnect(bool a, int r) : async(a), result(r) { } | 26 MockConnect(bool a, int r) : async(a), result(r) { } |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 const std::string& hostname, | 194 const std::string& hostname, |
195 const SSLConfig& ssl_config); | 195 const SSLConfig& ssl_config); |
196 | 196 |
197 private: | 197 private: |
198 MockSocketArray<MockSocket> mock_sockets_; | 198 MockSocketArray<MockSocket> mock_sockets_; |
199 MockSocketArray<MockSSLSocket> mock_ssl_sockets_; | 199 MockSocketArray<MockSSLSocket> mock_ssl_sockets_; |
200 }; | 200 }; |
201 | 201 |
202 } // namespace net | 202 } // namespace net |
203 | 203 |
204 #endif // NET_BASE_SOCKET_TEST_UTIL_H_ | 204 #endif // NET_SOCKET_SOCKET_TEST_UTIL_H_ |
OLD | NEW |