Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(758)

Side by Side Diff: jingle/notifier/base/xmpp_client_socket_factory.h

Issue 6833031: Changed the jingle network code in ChromeAsyncSocket to use the client socket pool. This also all... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: More Mac/Linux compile fixes Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
akalin 2011/04/14 21:54:50 I notice that this file is still listed as 'D' fro
sanjeevr 2011/04/14 23:15:43 Yeah I noticed that too, was not sure why. My svn
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 "base/memory/ref_counted.h"
11 #include "net/base/ssl_config_service.h"
11 12
12 namespace net { 13 namespace net {
13 class DnsCertProvenanceChecker; 14 class ClientSocket;
15 class ClientSocketFactory;
16 class ClientSocketHandle;
14 class HostPortPair; 17 class HostPortPair;
18 class NetLog;
19 class SSLClientSocket;
15 class SSLHostInfo; 20 class SSLHostInfo;
21 class URLRequestContextGetter;
16 } 22 }
17 23
18 namespace notifier { 24 namespace notifier {
19 25
20 class XmppClientSocketFactory : public net::ClientSocketFactory { 26 class XmppClientSocketFactory {
21 public: 27 public:
22 // Does not take ownership of |client_socket_factory|. 28 // Does not take ownership of |client_socket_factory|.
23 XmppClientSocketFactory( 29 XmppClientSocketFactory(
24 net::ClientSocketFactory* client_socket_factory, 30 net::ClientSocketFactory* client_socket_factory,
31 const net::SSLConfig& ssl_config,
32 const scoped_refptr<net::URLRequestContextGetter>& request_context_getter,
25 bool use_fake_ssl_client_socket); 33 bool use_fake_ssl_client_socket);
26 34
35 #if defined(UNIT_TEST)
akalin 2011/04/14 21:54:50 Instead of doing this, can you create an interface
sanjeevr 2011/04/14 23:15:43 Done.
36 XmppClientSocketFactory() : client_socket_factory_(NULL),
37 use_fake_ssl_client_socket_(false) { }
38 #endif // #if defined(UNIT_TEST)
39
27 virtual ~XmppClientSocketFactory(); 40 virtual ~XmppClientSocketFactory();
28 41
29 // net::ClientSocketFactory implementation. 42 // Method to create a transport socket using a HostPortPair.
30 virtual net::ClientSocket* CreateTransportClientSocket( 43 virtual net::ClientSocket* CreateTransportClientSocket(
31 const net::AddressList& addresses, net::NetLog* net_log, 44 const net::HostPortPair& host_and_port, net::NetLog* net_log);
32 const net::NetLog::Source& source); 45
33 virtual net::SSLClientSocket* CreateSSLClientSocket( 46 virtual net::SSLClientSocket* CreateSSLClientSocket(
34 net::ClientSocketHandle* transport_socket, 47 net::ClientSocketHandle* transport_socket,
35 const net::HostPortPair& host_and_port, const net::SSLConfig& ssl_config, 48 const net::HostPortPair& host_and_port);
36 net::SSLHostInfo* ssl_host_info, net::CertVerifier* cert_verifier,
37 net::DnsCertProvenanceChecker* dns_cert_checker);
38 virtual void ClearSSLSessionCache();
39 49
40 private: 50 private:
41 net::ClientSocketFactory* const client_socket_factory_; 51 net::ClientSocketFactory* const client_socket_factory_;
52 scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
53 const net::SSLConfig ssl_config_;
42 const bool use_fake_ssl_client_socket_; 54 const bool use_fake_ssl_client_socket_;
43 55
44 DISALLOW_COPY_AND_ASSIGN(XmppClientSocketFactory); 56 DISALLOW_COPY_AND_ASSIGN(XmppClientSocketFactory);
45 }; 57 };
46 58
47 } // namespace notifier 59 } // namespace notifier
48 60
49 #endif // JINGLE_NOTIFIER_BASE_XMPP_CLIENT_SOCKET_FACTORY_H_ 61 #endif // JINGLE_NOTIFIER_BASE_XMPP_CLIENT_SOCKET_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698