diff options
Diffstat (limited to 'net/dns')
-rw-r--r-- | net/dns/async_host_resolver.cc | 4 | ||||
-rw-r--r-- | net/dns/async_host_resolver.h | 2 | ||||
-rw-r--r-- | net/dns/dns_transaction.cc | 8 | ||||
-rw-r--r-- | net/dns/dns_transaction.h | 6 |
4 files changed, 11 insertions, 9 deletions
diff --git a/net/dns/async_host_resolver.cc b/net/dns/async_host_resolver.cc index ed0d70f..70c9277 100644 --- a/net/dns/async_host_resolver.cc +++ b/net/dns/async_host_resolver.cc @@ -351,8 +351,8 @@ AddressFamily AsyncHostResolver::GetDefaultAddressFamily() const { return ADDRESS_FAMILY_IPV4; } -HostResolverImpl* AsyncHostResolver::GetAsHostResolverImpl() { - return NULL; +HostCache* AsyncHostResolver::GetHostCache() { + return cache_.get(); } void AsyncHostResolver::OnTransactionComplete( diff --git a/net/dns/async_host_resolver.h b/net/dns/async_host_resolver.h index 9906720..f7e5c53 100644 --- a/net/dns/async_host_resolver.h +++ b/net/dns/async_host_resolver.h @@ -52,7 +52,7 @@ class NET_EXPORT AsyncHostResolver virtual void RemoveObserver(HostResolver::Observer* observer) OVERRIDE; virtual void SetDefaultAddressFamily(AddressFamily address_family) OVERRIDE; virtual AddressFamily GetDefaultAddressFamily() const OVERRIDE; - virtual HostResolverImpl* GetAsHostResolverImpl() OVERRIDE; + virtual HostCache* GetHostCache() OVERRIDE; // DnsTransaction::Delegate interface virtual void OnTransactionComplete( diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc index 30fd7bf..a7fa922 100644 --- a/net/dns/dns_transaction.cc +++ b/net/dns/dns_transaction.cc @@ -84,7 +84,8 @@ class DnsTransactionStartParameters : public NetLog::EventParameters { dict->SetString("dns_server", dns_server_.ToString()); dict->SetString("hostname", hostname); dict->SetInteger("query_type", key_.second); - dict->Set("source_dependency", source_.ToValue()); + if (source_.is_valid()) + dict->Set("source_dependency", source_.ToValue()); return dict; } @@ -107,7 +108,8 @@ class DnsTransactionFinishParameters : public NetLog::EventParameters { list->Append(Value::CreateStringValue(IPAddressToString(*it))); DictionaryValue* dict = new DictionaryValue(); - dict->SetInteger("net_error", net_error_); + if (net_error_) + dict->SetInteger("net_error", net_error_); dict->Set("address_list", list); return dict; } @@ -247,7 +249,7 @@ int DnsTransaction::DoConnect() { socket_.reset(socket_factory_->CreateDatagramClientSocket( DatagramSocket::RANDOM_BIND, base::Bind(&base::RandInt), - NULL, + net_log_.net_log(), net_log_.source())); net_log_.AddEvent( diff --git a/net/dns/dns_transaction.h b/net/dns/dns_transaction.h index 27da32a..c126193 100644 --- a/net/dns/dns_transaction.h +++ b/net/dns/dns_transaction.h @@ -29,15 +29,15 @@ class DnsQuery; class DnsResponse; // Performs (with fixed retries) a single asynchronous DNS transaction, -// which consists of sending out a DNS query, waiting for response, and +// which consists of sending out a DNS query, waiting for a response, and // parsing and returning the IP addresses that it matches. class NET_EXPORT_PRIVATE DnsTransaction : NON_EXPORTED_BASE(public base::NonThreadSafe) { public: typedef std::pair<std::string, uint16> Key; - // Interface that should implemented by DnsTransaction consumer and - // passed to |Start| method to be notified when the transaction has + // Interface that should be implemented by DnsTransaction consumers and + // passed to the |Start| method to be notified when the transaction has // completed. class NET_EXPORT_PRIVATE Delegate { public: |