Roll src/third_party/skia f622a6c:d3de40d
[chromium-blink-merge.git] / jingle / glue / xmpp_client_socket_factory.h
blobdb46afdd9cf827752b91798d4c04f27fb38c512a
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef JINGLE_GLUE_XMPP_CLIENT_SOCKET_FACTORY_H_
6 #define JINGLE_GLUE_XMPP_CLIENT_SOCKET_FACTORY_H_
8 #include <string>
10 #include "base/compiler_specific.h"
11 #include "base/memory/ref_counted.h"
12 #include "jingle/glue/resolving_client_socket_factory.h"
13 #include "net/ssl/ssl_config_service.h"
15 namespace net {
16 class ClientSocketFactory;
17 class ClientSocketHandle;
18 class HostPortPair;
19 class SSLClientSocket;
20 class StreamSocket;
21 class URLRequestContextGetter;
22 } // namespace net
24 namespace jingle_glue {
26 class XmppClientSocketFactory : public ResolvingClientSocketFactory {
27 public:
28 // Does not take ownership of |client_socket_factory|.
29 XmppClientSocketFactory(
30 net::ClientSocketFactory* client_socket_factory,
31 const net::SSLConfig& ssl_config,
32 const scoped_refptr<net::URLRequestContextGetter>& request_context_getter,
33 bool use_fake_ssl_client_socket);
35 ~XmppClientSocketFactory() override;
37 // ResolvingClientSocketFactory implementation.
38 scoped_ptr<net::StreamSocket> CreateTransportClientSocket(
39 const net::HostPortPair& host_and_port) override;
41 scoped_ptr<net::SSLClientSocket> CreateSSLClientSocket(
42 scoped_ptr<net::ClientSocketHandle> transport_socket,
43 const net::HostPortPair& host_and_port) override;
45 private:
46 net::ClientSocketFactory* const client_socket_factory_;
47 scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
48 const net::SSLConfig ssl_config_;
49 const bool use_fake_ssl_client_socket_;
51 DISALLOW_COPY_AND_ASSIGN(XmppClientSocketFactory);
54 } // namespace jingle_glue
56 #endif // JINGLE_GLUE_XMPP_CLIENT_SOCKET_FACTORY_H_