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

Unified Diff: components/webcrypto/algorithms/aes_kw_unittest.cc

Issue 2889163002: Remove raw DictionaryValue::Set in //components (Closed)
Patch Set: Nits 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
Index: components/webcrypto/algorithms/aes_kw_unittest.cc
diff --git a/components/webcrypto/algorithms/aes_kw_unittest.cc b/components/webcrypto/algorithms/aes_kw_unittest.cc
index 293510021f2a215387d283bb12e792366aefd977..12dea24036adb136aa461c5258ca6b4491b5ee99 100644
--- a/components/webcrypto/algorithms/aes_kw_unittest.cc
+++ b/components/webcrypto/algorithms/aes_kw_unittest.cc
@@ -6,6 +6,7 @@
#include <stdint.h>
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/stl_util.h"
#include "base/values.h"
#include "components/webcrypto/algorithm_dispatch.h"
@@ -58,8 +59,8 @@ TEST_F(WebCryptoAesKwTest, ImportKeyJwkKeyOpsWrapUnwrap) {
base::DictionaryValue dict;
dict.SetString("kty", "oct");
dict.SetString("k", "GADWrMRHwQfoNaXU5fZvTg");
- base::ListValue* key_ops = new base::ListValue;
- dict.Set("key_ops", key_ops); // Takes ownership.
+ base::ListValue* key_ops =
+ dict.SetList("key_ops", base::MakeUnique<base::ListValue>());
key_ops->AppendString("wrapKey");
« no previous file with comments | « components/webcrypto/algorithms/aes_cbc_unittest.cc ('k') | components/webcrypto/algorithms/hmac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698