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

Unified Diff: net/log/net_log_util.cc

Issue 2953483003: Add HostCachePersistenceManager for Cronet (Closed)
Patch Set: move constant Created 3 years, 6 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/host_cache_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/log/net_log_util.cc
diff --git a/net/log/net_log_util.cc b/net/log/net_log_util.cc
index 8cda4082a62d340c6057473d417b03b5376d724a..5d6dcd1e87f366fd697ecf04fb4abb945702e3a8 100644
--- a/net/log/net_log_util.cc
+++ b/net/log/net_log_util.cc
@@ -383,13 +383,16 @@ NET_EXPORT std::unique_ptr<base::DictionaryValue> GetNetInfo(
dict->Set("dns_config", std::move(dns_config));
auto cache_info_dict = base::MakeUnique<base::DictionaryValue>();
+ auto cache_contents_list = base::MakeUnique<base::ListValue>();
cache_info_dict->SetInteger("capacity",
static_cast<int>(cache->max_entries()));
cache_info_dict->SetInteger("network_changes", cache->network_changes());
- cache_info_dict->Set("entries",
- cache->GetAsListValue(/*include_staleness=*/true));
+ cache->GetAsListValue(cache_contents_list.get(),
+ /*include_staleness=*/true);
+ cache_info_dict->Set("entries", std::move(cache_contents_list));
+
dict->Set("cache", std::move(cache_info_dict));
net_info_dict->Set(NetInfoSourceToString(NET_INFO_HOST_RESOLVER),
std::move(dict));
« no previous file with comments | « net/dns/host_cache_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698