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

Unified Diff: net/dns/dns_transaction.cc

Issue 2907263002: [Not for review] Add TRACE_EVENTs and chrome://flags for preconnect
Patch Set: Created 3 years, 7 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
« no previous file with comments | « net/dns/dns_response.cc ('k') | net/quic/chromium/quic_stream_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_transaction.cc
diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
index 8c7a757724096773e40e90d5178c981f9cdfaee9..583e2b3a4c3d7bfb271c38580ca803441d9de050 100644
--- a/net/dns/dns_transaction.cc
+++ b/net/dns/dns_transaction.cc
@@ -26,6 +26,7 @@
#include "base/threading/non_thread_safe.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/timer/timer.h"
+#include "base/trace_event/trace_event.h"
#include "base/values.h"
#include "net/base/completion_callback.h"
#include "net/base/io_buffer.h"
@@ -284,6 +285,8 @@ class DnsUDPAttempt : public DnsAttempt {
}
void OnIOComplete(int rv) {
+ TRACE_EVENT1("net", "DnsUDPAttempt::OnIOComplete", "qname",
+ query_->qname().as_string());
rv = DoLoop(rv);
if (rv != ERR_IO_PENDING)
callback_.Run(rv);
@@ -801,6 +804,8 @@ class DnsTransactionImpl : public DnsTransaction,
// Begins query for the current name. Makes the first attempt.
AttemptResult StartQuery() {
std::string dotted_qname = DNSDomainToString(qnames_.front());
+ TRACE_EVENT1("net", "DnsTransactionImpl::StartQuery", "dotted_qname",
+ dotted_qname);
net_log_.BeginEvent(NetLogEventType::DNS_TRANSACTION_QUERY,
NetLog::StringCallback("qname", &dotted_qname));
« no previous file with comments | « net/dns/dns_response.cc ('k') | net/quic/chromium/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698