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

Unified Diff: net/dns/dns_config_service.cc

Issue 1135373002: Updated NetLog::ParametersCallback & all related calbacks returning value as scoped_ptr<base::Value… Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/dns/dns_config_service.h ('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..84696c17a5a620872d2b56f4dc2453d190912cf1 100644
--- a/net/dns/dns_config_service.cc
+++ b/net/dns/dns_config_service.cc
@@ -138,18 +138,18 @@ void DnsConfig::CopyIgnoreHosts(const DnsConfig& d) {
use_local_ipv6 = d.use_local_ipv6;
}
-base::Value* DnsConfig::ToValue() const {
- base::DictionaryValue* dict = new base::DictionaryValue();
+scoped_ptr<base::Value> DnsConfig::ToValue() const {
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
- base::ListValue* list = new base::ListValue();
+ scoped_ptr<base::ListValue> list(new base::ListValue());
for (size_t i = 0; i < nameservers.size(); ++i)
list->Append(new base::StringValue(nameservers[i].ToString()));
- dict->Set("nameservers", list);
+ dict->Set("nameservers", list.Pass());
- list = new base::ListValue();
+ list.reset(new base::ListValue());
for (size_t i = 0; i < search.size(); ++i)
list->Append(new base::StringValue(search[i]));
- dict->Set("search", list);
+ dict->Set("search", list.Pass());
dict->SetBoolean("unhandled_options", unhandled_options);
dict->SetBoolean("append_to_multi_label_name", append_to_multi_label_name);
@@ -161,7 +161,7 @@ base::Value* DnsConfig::ToValue() const {
dict->SetBoolean("use_local_ipv6", use_local_ipv6);
dict->SetInteger("num_hosts", hosts.size());
- return dict;
+ return dict.Pass();
}
« no previous file with comments | « net/dns/dns_config_service.h ('k') | net/dns/dns_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698