blob: 17019701a465968b27bae86397ebe186209fa8cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/base/client_socket_factory.h"
#include "base/singleton.h"
#include "net/base/ssl_client_socket.h"
#include "net/base/tcp_client_socket.h"
namespace net {
class DefaultClientSocketFactory : public ClientSocketFactory {
public:
virtual ClientSocket* CreateTCPClientSocket(
const AddressList& addresses) {
return new TCPClientSocket(addresses);
}
virtual ClientSocket* CreateSSLClientSocket(
ClientSocket* transport_socket,
const std::string& hostname) {
return new SSLClientSocket(transport_socket, hostname);
}
};
// static
ClientSocketFactory* ClientSocketFactory::GetDefaultFactory() {
return Singleton<DefaultClientSocketFactory>::get();
}
} // namespace net
|