OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "jingle/notifier/base/chrome_async_socket.h" | 5 #include "jingle/notifier/base/chrome_async_socket.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <winsock2.h> | 8 #include <winsock2.h> |
9 #elif defined(OS_POSIX) | 9 #elif defined(OS_POSIX) |
10 #include <arpa/inet.h> | 10 #include <arpa/inet.h> |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 class MockXmppClientSocketFactory : public ResolvingClientSocketFactory { | 123 class MockXmppClientSocketFactory : public ResolvingClientSocketFactory { |
124 public: | 124 public: |
125 MockXmppClientSocketFactory( | 125 MockXmppClientSocketFactory( |
126 net::ClientSocketFactory* mock_client_socket_factory, | 126 net::ClientSocketFactory* mock_client_socket_factory, |
127 const net::AddressList& address_list) | 127 const net::AddressList& address_list) |
128 : mock_client_socket_factory_(mock_client_socket_factory), | 128 : mock_client_socket_factory_(mock_client_socket_factory), |
129 address_list_(address_list) { | 129 address_list_(address_list) { |
130 } | 130 } |
131 | 131 |
132 // ResolvingClientSocketFactory implementation. | 132 // ResolvingClientSocketFactory implementation. |
133 virtual net::ClientSocket* CreateTransportClientSocket( | 133 virtual net::StreamSocket* CreateTransportClientSocket( |
134 const net::HostPortPair& host_and_port, net::NetLog* net_log) { | 134 const net::HostPortPair& host_and_port, net::NetLog* net_log) { |
135 return mock_client_socket_factory_->CreateTransportClientSocket( | 135 return mock_client_socket_factory_->CreateTransportClientSocket( |
136 address_list_, net_log, net::NetLog::Source()); | 136 address_list_, net_log, net::NetLog::Source()); |
137 } | 137 } |
138 | 138 |
139 virtual net::SSLClientSocket* CreateSSLClientSocket( | 139 virtual net::SSLClientSocket* CreateSSLClientSocket( |
140 net::ClientSocketHandle* transport_socket, | 140 net::ClientSocketHandle* transport_socket, |
141 const net::HostPortPair& host_and_port) { | 141 const net::HostPortPair& host_and_port) { |
142 return mock_client_socket_factory_->CreateSSLClientSocket( | 142 return mock_client_socket_factory_->CreateSSLClientSocket( |
143 transport_socket, host_and_port, ssl_config_, NULL, &cert_verifier_, | 143 transport_socket, host_and_port, ssl_config_, NULL, &cert_verifier_, |
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1072 message_loop_.RunAllPending(); | 1072 message_loop_.RunAllPending(); |
1073 | 1073 |
1074 ExpectNoSignal(); | 1074 ExpectNoSignal(); |
1075 | 1075 |
1076 DoSSLCloseOpenedNoError(); | 1076 DoSSLCloseOpenedNoError(); |
1077 } | 1077 } |
1078 | 1078 |
1079 } // namespace | 1079 } // namespace |
1080 | 1080 |
1081 } // namespace notifier | 1081 } // namespace notifier |
OLD | NEW |