OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #include "net/socket/client_socket_factory.h" | 5 #include "net/socket/client_socket_factory.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 DatagramSocket::BindType bind_type, | 53 DatagramSocket::BindType bind_type, |
54 const RandIntCallback& rand_int_cb, | 54 const RandIntCallback& rand_int_cb, |
55 NetLog* net_log, | 55 NetLog* net_log, |
56 const NetLog::Source& source) override { | 56 const NetLog::Source& source) override { |
57 return scoped_ptr<DatagramClientSocket>( | 57 return scoped_ptr<DatagramClientSocket>( |
58 new UDPClientSocket(bind_type, rand_int_cb, net_log, source)); | 58 new UDPClientSocket(bind_type, rand_int_cb, net_log, source)); |
59 } | 59 } |
60 | 60 |
61 scoped_ptr<StreamSocket> CreateTransportClientSocket( | 61 scoped_ptr<StreamSocket> CreateTransportClientSocket( |
62 const AddressList& addresses, | 62 const AddressList& addresses, |
| 63 scoped_ptr<SocketPerformanceWatcher> socket_performance_watcher, |
63 NetLog* net_log, | 64 NetLog* net_log, |
64 const NetLog::Source& source) override { | 65 const NetLog::Source& source) override { |
65 return scoped_ptr<StreamSocket>( | 66 return scoped_ptr<StreamSocket>(new TCPClientSocket( |
66 new TCPClientSocket(addresses, net_log, source)); | 67 addresses, std::move(socket_performance_watcher), net_log, source)); |
67 } | 68 } |
68 | 69 |
69 scoped_ptr<SSLClientSocket> CreateSSLClientSocket( | 70 scoped_ptr<SSLClientSocket> CreateSSLClientSocket( |
70 scoped_ptr<ClientSocketHandle> transport_socket, | 71 scoped_ptr<ClientSocketHandle> transport_socket, |
71 const HostPortPair& host_and_port, | 72 const HostPortPair& host_and_port, |
72 const SSLConfig& ssl_config, | 73 const SSLConfig& ssl_config, |
73 const SSLClientSocketContext& context) override { | 74 const SSLClientSocketContext& context) override { |
74 #if defined(USE_OPENSSL) | 75 #if defined(USE_OPENSSL) |
75 return scoped_ptr<SSLClientSocket>(new SSLClientSocketOpenSSL( | 76 return scoped_ptr<SSLClientSocket>(new SSLClientSocketOpenSSL( |
76 std::move(transport_socket), host_and_port, ssl_config, context)); | 77 std::move(transport_socket), host_and_port, ssl_config, context)); |
(...skipping 10 matching lines...) Expand all Loading... |
87 g_default_client_socket_factory = LAZY_INSTANCE_INITIALIZER; | 88 g_default_client_socket_factory = LAZY_INSTANCE_INITIALIZER; |
88 | 89 |
89 } // namespace | 90 } // namespace |
90 | 91 |
91 // static | 92 // static |
92 ClientSocketFactory* ClientSocketFactory::GetDefaultFactory() { | 93 ClientSocketFactory* ClientSocketFactory::GetDefaultFactory() { |
93 return g_default_client_socket_factory.Pointer(); | 94 return g_default_client_socket_factory.Pointer(); |
94 } | 95 } |
95 | 96 |
96 } // namespace net | 97 } // namespace net |
OLD | NEW |