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

Unified Diff: net/http/transport_security_persister.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/http/http_response_headers.cc ('k') | net/log/net_log_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/transport_security_persister.cc
diff --git a/net/http/transport_security_persister.cc b/net/http/transport_security_persister.cc
index 44233b6e66b245f431bd54f88549e1f561fa7c80..7919dcb8d787015bfb8c13ac0508997c16abb644 100644
--- a/net/http/transport_security_persister.cc
+++ b/net/http/transport_security_persister.cc
@@ -15,6 +15,7 @@
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/location.h"
+#include "base/memory/ptr_util.h"
#include "base/sequenced_task_runner.h"
#include "base/task_runner_util.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -27,8 +28,9 @@ namespace net {
namespace {
-base::ListValue* SPKIHashesToListValue(const HashValueVector& hashes) {
- base::ListValue* pins = new base::ListValue;
+std::unique_ptr<base::ListValue> SPKIHashesToListValue(
+ const HashValueVector& hashes) {
+ auto pins = base::MakeUnique<base::ListValue>();
for (size_t i = 0; i != hashes.size(); i++)
pins->AppendString(hashes[i].ToString());
return pins;
« no previous file with comments | « net/http/http_response_headers.cc ('k') | net/log/net_log_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698