Chromium Code Reviews| Index: net/dns/dns_socket_pool.cc |
| diff --git a/net/dns/dns_socket_pool.cc b/net/dns/dns_socket_pool.cc |
| index 9f55550cf3e806727183893427587d6ff75ca959..208f0bc021318bea99fd1241d3704469f205a708 100644 |
| --- a/net/dns/dns_socket_pool.cc |
| +++ b/net/dns/dns_socket_pool.cc |
| @@ -7,10 +7,12 @@ |
| #include "base/logging.h" |
| #include "base/rand_util.h" |
| #include "base/stl_util.h" |
| +#include "net/base/address_list.h" |
| #include "net/base/ip_endpoint.h" |
| #include "net/base/net_errors.h" |
| #include "net/base/rand_callback.h" |
| #include "net/socket/client_socket_factory.h" |
| +#include "net/socket/stream_socket.h" |
| #include "net/udp/datagram_client_socket.h" |
| namespace net { |
| @@ -57,6 +59,16 @@ void DnsSocketPool::InitializeInternal( |
| initialized_ = true; |
| } |
| +scoped_ptr<StreamSocket> DnsSocketPool::AllocateTCPSocket( |
|
mmenke
2012/12/19 16:44:09
Have you thought about using a TransportClientSock
szym
2012/12/19 23:35:56
Right now I don't really see the benefit beyond sa
mmenke
2012/12/20 16:26:28
I hadn't realized the odds of subsequent queries r
|
| + unsigned server_index, |
| + const NetLog::Source& source) { |
| + DCHECK_LT(server_index, nameservers_->size()); |
| + |
| + return scoped_ptr<StreamSocket>( |
| + socket_factory_->CreateTransportClientSocket( |
| + AddressList((*nameservers_)[server_index]), net_log_, source)); |
| +} |
| + |
| scoped_ptr<DatagramClientSocket> DnsSocketPool::CreateConnectedSocket( |
| unsigned server_index) { |
| DCHECK_LT(server_index, nameservers_->size()); |