| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 JINGLE_NOTIFIER_BASE_XMPP_CLIENT_SOCKET_FACTORY_H_ | 5 #ifndef JINGLE_NOTIFIER_BASE_XMPP_CLIENT_SOCKET_FACTORY_H_ |
| 6 #define JINGLE_NOTIFIER_BASE_XMPP_CLIENT_SOCKET_FACTORY_H_ | 6 #define JINGLE_NOTIFIER_BASE_XMPP_CLIENT_SOCKET_FACTORY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "net/socket/client_socket_factory.h" | 10 #include "net/socket/client_socket_factory.h" |
| 11 | 11 |
| 12 namespace net { |
| 13 class SSLHostInfo; |
| 14 } |
| 15 |
| 12 namespace notifier { | 16 namespace notifier { |
| 13 | 17 |
| 14 class XmppClientSocketFactory : public net::ClientSocketFactory { | 18 class XmppClientSocketFactory : public net::ClientSocketFactory { |
| 15 public: | 19 public: |
| 16 // Does not take ownership of |client_socket_factory|. | 20 // Does not take ownership of |client_socket_factory|. |
| 17 XmppClientSocketFactory( | 21 XmppClientSocketFactory( |
| 18 net::ClientSocketFactory* client_socket_factory, | 22 net::ClientSocketFactory* client_socket_factory, |
| 19 bool use_fake_ssl_client_socket); | 23 bool use_fake_ssl_client_socket); |
| 20 | 24 |
| 21 virtual ~XmppClientSocketFactory(); | 25 virtual ~XmppClientSocketFactory(); |
| 22 | 26 |
| 23 // net::ClientSocketFactory implementation. | 27 // net::ClientSocketFactory implementation. |
| 24 virtual net::ClientSocket* CreateTCPClientSocket( | 28 virtual net::ClientSocket* CreateTCPClientSocket( |
| 25 const net::AddressList& addresses, net::NetLog* net_log, | 29 const net::AddressList& addresses, net::NetLog* net_log, |
| 26 const net::NetLog::Source& source); | 30 const net::NetLog::Source& source); |
| 27 virtual net::SSLClientSocket* CreateSSLClientSocket( | 31 virtual net::SSLClientSocket* CreateSSLClientSocket( |
| 28 net::ClientSocketHandle* transport_socket, const std::string& hostname, | 32 net::ClientSocketHandle* transport_socket, const std::string& hostname, |
| 29 const net::SSLConfig& ssl_config); | 33 const net::SSLConfig& ssl_config, net::SSLHostInfo* ssl_host_info); |
| 30 | 34 |
| 31 private: | 35 private: |
| 32 net::ClientSocketFactory* const client_socket_factory_; | 36 net::ClientSocketFactory* const client_socket_factory_; |
| 33 const bool use_fake_ssl_client_socket_; | 37 const bool use_fake_ssl_client_socket_; |
| 34 | 38 |
| 35 DISALLOW_COPY_AND_ASSIGN(XmppClientSocketFactory); | 39 DISALLOW_COPY_AND_ASSIGN(XmppClientSocketFactory); |
| 36 }; | 40 }; |
| 37 | 41 |
| 38 } // namespace notifier | 42 } // namespace notifier |
| 39 | 43 |
| 40 #endif // JINGLE_NOTIFIER_BASE_XMPP_CLIENT_SOCKET_FACTORY_H_ | 44 #endif // JINGLE_NOTIFIER_BASE_XMPP_CLIENT_SOCKET_FACTORY_H_ |
| OLD | NEW |