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

Unified Diff: net/log/net_log_util.cc

Issue 1152103003: Returning scoped_ptr in SdchInfoToValue() instead of raw pointers in net/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated review comments Created 5 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/base/sdch_manager.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 6b78359c915ac0099024811e9301d80dc643d5f7..9d41a46936685a279da58c69d75184f3ff4ce249 100644
--- a/net/log/net_log_util.cc
+++ b/net/log/net_log_util.cc
@@ -474,14 +474,14 @@ NET_EXPORT scoped_ptr<base::DictionaryValue> GetNetInfo(
}
if (info_sources & NET_INFO_SDCH) {
- base::Value* info_dict;
+ scoped_ptr<base::Value> info_dict;
SdchManager* sdch_manager = context->sdch_manager();
if (sdch_manager) {
info_dict = sdch_manager->SdchInfoToValue();
} else {
- info_dict = new base::DictionaryValue();
+ info_dict.reset(new base::DictionaryValue());
}
- net_info_dict->Set(NetInfoSourceToString(NET_INFO_SDCH), info_dict);
+ net_info_dict->Set(NetInfoSourceToString(NET_INFO_SDCH), info_dict.Pass());
}
return net_info_dict.Pass();
« no previous file with comments | « net/base/sdch_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698