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

Unified Diff: net/proxy/proxy_config.cc

Issue 2899723003: Remove raw base::DictionaryValue::Set in //net (Closed)
Patch Set: Rebase Created 3 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/log/net_log_util.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_config.cc
diff --git a/net/proxy/proxy_config.cc b/net/proxy/proxy_config.cc
index b2d34cab2bcc632d155b43073094202028383b66..48b7ec71e10287c7ae68a0f9acfd899f499bdc65 100644
--- a/net/proxy/proxy_config.cc
+++ b/net/proxy/proxy_config.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_tokenizer.h"
#include "base/strings/string_util.h"
#include "base/values.h"
@@ -261,7 +262,7 @@ std::unique_ptr<base::DictionaryValue> ProxyConfig::ToValue() const {
if (proxy_rules_.reverse_bypass)
dict->SetBoolean("reverse_bypass", true);
- base::ListValue* list = new base::ListValue();
+ auto list = base::MakeUnique<base::ListValue>();
for (ProxyBypassRules::RuleList::const_iterator it =
bypass.rules().begin();
@@ -269,7 +270,7 @@ std::unique_ptr<base::DictionaryValue> ProxyConfig::ToValue() const {
list->AppendString((*it)->ToString());
}
- dict->Set("bypass_list", list);
+ dict->Set("bypass_list", std::move(list));
}
}
« no previous file with comments | « net/log/net_log_util.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698