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

Unified Diff: net/dns/dns_socket_pool.cc

Issue 11567031: [net/dns] Handle TC bit on DNS response in DnsTransaction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add test for timeout and fix timeout logic Created 8 years 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 side-by-side diff with in-line comments
Download patch
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());

Powered by Google App Engine
This is Rietveld 408576698