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

Unified Diff: net/dns/dns_transaction.cc

Issue 9369045: [net] HostResolverImpl + DnsTransaction + DnsConfigService = Asynchronous DNS ready for experiments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ClientSocketFactory lifetime. Move ScopedAllowIO to StartWatch. Added DnsTask logging. Created 8 years, 10 months 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_transaction.cc
diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
index 6cd02a33bd5b707945971bf300d3540d7a031c0d..222ee585310b946a52e627081885a0be955cfcb1 100644
--- a/net/dns/dns_transaction.cc
+++ b/net/dns/dns_transaction.cc
@@ -78,7 +78,7 @@ class ResponseParameters : public NetLog::EventParameters {
DictionaryValue* dict = new DictionaryValue();
dict->SetInteger("rcode", rcode_);
dict->SetInteger("answer_count", answer_count_);
- dict->Set("socket_source", source_.ToValue());
+ dict->Set("source_dependency", source_.ToValue());
return dict;
}
@@ -211,6 +211,8 @@ class DnsUDPAttempt {
return rv;
DCHECK(rv);
+ // TODO(szym): Consider making this check less aggressive.
+ // Other implementations simply ignore mismatched responses.
if (!response_->InitParse(rv, *query_))
return ERR_DNS_MALFORMED_RESPONSE;
if (response_->flags() & dns_protocol::kFlagTC)
@@ -303,6 +305,10 @@ class DnsTransactionImpl : public DnsTransaction, public base::NonThreadSafe {
return rv;
}
+ virtual const BoundNetLog& net_log() const {
mmenke 2012/02/14 18:46:00 nit: OVERRIDE
+ return net_log_;
+ }
+
private:
// Prepares |qnames_| according to the DnsConfig.
int PrepareSearch() {
@@ -387,7 +393,8 @@ class DnsTransactionImpl : public DnsTransaction, public base::NonThreadSafe {
}
net_log_.AddEvent(NetLog::TYPE_DNS_TRANSACTION_ATTEMPT, make_scoped_refptr(
- new NetLogSourceParameter("socket_source", socket->NetLog().source())));
+ new NetLogSourceParameter("source_dependency",
+ socket->NetLog().source())));
const DnsConfig& config = session_->config();

Powered by Google App Engine
This is Rietveld 408576698