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

Unified Diff: net/log/net_log_util.cc

Issue 2058233002: Rewrite simple uses of base::ListValue::Append() taking a raw pointer var. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: less comments more ownership Created 4 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/http/http_server_properties_manager_unittest.cc ('k') | net/quic/quic_connection_logger.cc » ('j') | 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 23088691210558d2f0fbab1d4e7db9b0e3aef844..b9df667af18416f567e3994d3ccf10310f6eaed6 100644
--- a/net/log/net_log_util.cc
+++ b/net/log/net_log_util.cc
@@ -385,7 +385,8 @@ NET_EXPORT std::unique_ptr<base::DictionaryValue> GetNetInfo(
const HostCache::Key& key = pair.first;
const HostCache::Entry& entry = pair.second;
- base::DictionaryValue* entry_dict = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> entry_dict(
+ new base::DictionaryValue());
entry_dict->SetString("hostname", key.hostname);
entry_dict->SetInteger("address_family",
@@ -404,7 +405,7 @@ NET_EXPORT std::unique_ptr<base::DictionaryValue> GetNetInfo(
entry_dict->Set("addresses", address_list);
}
- entry_list->Append(entry_dict);
+ entry_list->Append(std::move(entry_dict));
}
cache_info_dict->Set("entries", entry_list);
« no previous file with comments | « net/http/http_server_properties_manager_unittest.cc ('k') | net/quic/quic_connection_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698