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

Unified Diff: chrome/browser/net/view_net_internals_job_factory.cc

Issue 1566012: HostResolver supports optional CNAME lookups. (Closed)
Patch Set: Added CNAME details to about:net-internals Created 10 years, 8 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 | « chrome/browser/intranet_redirect_detector.cc ('k') | chrome/test/unit/chrome_test_suite.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/view_net_internals_job_factory.cc
diff --git a/chrome/browser/net/view_net_internals_job_factory.cc b/chrome/browser/net/view_net_internals_job_factory.cc
index aa39f1f9919bf458a9e5197e6e5ccc805c2c5ddd..b957aca3d3831058d1712855c7ac4a93c377eada 100644
--- a/chrome/browser/net/view_net_internals_job_factory.cc
+++ b/chrome/browser/net/view_net_internals_job_factory.cc
@@ -349,6 +349,7 @@ class HostResolverCacheSubSection : public SubSection {
"<th>Host</th>"
"<th>Address family</th>"
"<th>Address list</th>"
+ "<th>Canonical name</th>"
"<th>Time to live (ms)</th>"
"</tr>");
@@ -377,6 +378,7 @@ class HostResolverCacheSubSection : public SubSection {
// Stringify all of the addresses in the address list, separated
// by newlines (br).
std::string address_list_html;
+ std::string canonical_name_html;
if (entry->error != net::OK) {
address_list_html = "<span style='font-weight: bold; color:red'>" +
@@ -391,14 +393,19 @@ class HostResolverCacheSubSection : public SubSection {
net::NetAddressToString(current_address));
current_address = current_address->ai_next;
}
+ std::string canonical_name;
+ if (entry->addrlist.GetCanonicalName(&canonical_name)) {
+ canonical_name_html = EscapeForHTML(canonical_name);
+ }
}
StringAppendF(out,
"<td>%s</td><td>%s</td><td>%s</td>"
- "<td>%d</td></tr>",
+ "<td>%s</td><td>%d</td></tr>",
EscapeForHTML(key.hostname).c_str(),
EscapeForHTML(address_family_str).c_str(),
address_list_html.c_str(),
+ canonical_name_html.c_str(),
ttl_ms);
}
« no previous file with comments | « chrome/browser/intranet_redirect_detector.cc ('k') | chrome/test/unit/chrome_test_suite.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698