| Index: net/log/net_log_util.cc
|
| diff --git a/net/log/net_log_util.cc b/net/log/net_log_util.cc
|
| index 2b5f6b553b7cd1490d2f6ef2aeb1775348fffbc9..2234f357443485e4c33066245889147589dc5900 100644
|
| --- a/net/log/net_log_util.cc
|
| +++ b/net/log/net_log_util.cc
|
| @@ -375,41 +375,11 @@ NET_EXPORT std::unique_ptr<base::DictionaryValue> GetNetInfo(
|
| dict->Set("dns_config", std::move(dns_config));
|
|
|
| base::DictionaryValue* cache_info_dict = new base::DictionaryValue();
|
| -
|
| cache_info_dict->SetInteger("capacity",
|
| static_cast<int>(cache->max_entries()));
|
| -
|
| - base::ListValue* entry_list = new base::ListValue();
|
| -
|
| - HostCache::EntryMap::Iterator it(cache->entries());
|
| - for (; it.HasNext(); it.Advance()) {
|
| - const HostCache::Key& key = it.key();
|
| - const HostCache::Entry& entry = it.value();
|
| -
|
| - base::DictionaryValue* entry_dict = new base::DictionaryValue();
|
| -
|
| - entry_dict->SetString("hostname", key.hostname);
|
| - entry_dict->SetInteger("address_family",
|
| - static_cast<int>(key.address_family));
|
| - entry_dict->SetString("expiration",
|
| - NetLog::TickCountToString(it.expiration()));
|
| -
|
| - if (entry.error != OK) {
|
| - entry_dict->SetInteger("error", entry.error);
|
| - } else {
|
| - // Append all of the resolved addresses.
|
| - base::ListValue* address_list = new base::ListValue();
|
| - for (size_t i = 0; i < entry.addrlist.size(); ++i) {
|
| - address_list->AppendString(entry.addrlist[i].ToStringWithoutPort());
|
| - }
|
| - entry_dict->Set("addresses", address_list);
|
| - }
|
| -
|
| - entry_list->Append(entry_dict);
|
| - }
|
| -
|
| - cache_info_dict->Set("entries", entry_list);
|
| + cache_info_dict->Set("entries", cache->GetEntriesAsValue());
|
| dict->Set("cache", cache_info_dict);
|
| +
|
| net_info_dict->Set(NetInfoSourceToString(NET_INFO_HOST_RESOLVER),
|
| std::move(dict));
|
| }
|
|
|