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

Unified Diff: net/dns/dns_config_service.cc

Issue 1149763005: Change NetLog::ParametersCallback to return a scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments on ownership removed 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/disk_cache/simple/simple_net_log_parameters.cc ('k') | net/dns/dns_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_config_service.cc
diff --git a/net/dns/dns_config_service.cc b/net/dns/dns_config_service.cc
index bfa4b8db84e648393eecfd4ce8a4d82ff6afcce7..38b61ffce9bc581a2608ca50ba96036f866bb5ee 100644
--- a/net/dns/dns_config_service.cc
+++ b/net/dns/dns_config_service.cc
@@ -139,7 +139,7 @@ void DnsConfig::CopyIgnoreHosts(const DnsConfig& d) {
}
base::Value* DnsConfig::ToValue() const {
- base::DictionaryValue* dict = new base::DictionaryValue();
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
base::ListValue* list = new base::ListValue();
for (size_t i = 0; i < nameservers.size(); ++i)
@@ -161,10 +161,9 @@ base::Value* DnsConfig::ToValue() const {
dict->SetBoolean("use_local_ipv6", use_local_ipv6);
dict->SetInteger("num_hosts", hosts.size());
- return dict;
+ return dict.release();
}
-
DnsConfigService::DnsConfigService()
: watch_failed_(false),
have_config_(false),
« no previous file with comments | « net/disk_cache/simple/simple_net_log_parameters.cc ('k') | net/dns/dns_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698