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