| Index: net/dns/dns_config_service.cc
|
| diff --git a/net/dns/dns_config_service.cc b/net/dns/dns_config_service.cc
|
| index 1a7a59d5df438ad506ef864722e96944144c416c..64f70fe2cae81e60e16c06df51c75a96e589698d 100644
|
| --- a/net/dns/dns_config_service.cc
|
| +++ b/net/dns/dns_config_service.cc
|
| @@ -4,7 +4,10 @@
|
|
|
| #include "net/dns/dns_config_service.h"
|
|
|
| +#include <utility>
|
| +
|
| #include "base/logging.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/metrics/histogram_macros.h"
|
| #include "base/values.h"
|
| #include "net/base/ip_endpoint.h"
|
| @@ -60,17 +63,17 @@ void DnsConfig::CopyIgnoreHosts(const DnsConfig& d) {
|
| }
|
|
|
| std::unique_ptr<base::Value> DnsConfig::ToValue() const {
|
| - std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
|
| + auto dict = base::MakeUnique<base::DictionaryValue>();
|
|
|
| - base::ListValue* list = new base::ListValue();
|
| + auto list = base::MakeUnique<base::ListValue>();
|
| for (size_t i = 0; i < nameservers.size(); ++i)
|
| list->AppendString(nameservers[i].ToString());
|
| - dict->Set("nameservers", list);
|
| + dict->Set("nameservers", std::move(list));
|
|
|
| - list = new base::ListValue();
|
| + list = base::MakeUnique<base::ListValue>();
|
| for (size_t i = 0; i < search.size(); ++i)
|
| list->AppendString(search[i]);
|
| - dict->Set("search", list);
|
| + dict->Set("search", std::move(list));
|
|
|
| dict->SetBoolean("unhandled_options", unhandled_options);
|
| dict->SetBoolean("append_to_multi_label_name", append_to_multi_label_name);
|
|
|