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

Unified Diff: base/json/json_writer_unittest.cc

Issue 2258713003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 | « base/files/important_file_writer_unittest.cc ('k') | base/message_loop/message_pump_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/json_writer_unittest.cc
diff --git a/base/json/json_writer_unittest.cc b/base/json/json_writer_unittest.cc
index 233ac5e86785117a4272e62ef382c8e319c82f0d..03f803f03fea1a913124b64f0e35aec5490491db 100644
--- a/base/json/json_writer_unittest.cc
+++ b/base/json/json_writer_unittest.cc
@@ -61,7 +61,7 @@ TEST(JSONWriterTest, NestedTypes) {
std::unique_ptr<DictionaryValue> inner_dict(new DictionaryValue());
inner_dict->SetInteger("inner int", 10);
list->Append(std::move(inner_dict));
- list->Append(WrapUnique(new ListValue()));
+ list->Append(MakeUnique<ListValue>());
list->AppendBoolean(true);
root_dict.Set("list", std::move(list));
@@ -119,9 +119,9 @@ TEST(JSONWriterTest, BinaryValues) {
ListValue binary_list;
binary_list.Append(BinaryValue::CreateWithCopiedBuffer("asdf", 4));
- binary_list.Append(WrapUnique(new FundamentalValue(5)));
+ binary_list.Append(MakeUnique<FundamentalValue>(5));
binary_list.Append(BinaryValue::CreateWithCopiedBuffer("asdf", 4));
- binary_list.Append(WrapUnique(new FundamentalValue(2)));
+ binary_list.Append(MakeUnique<FundamentalValue>(2));
binary_list.Append(BinaryValue::CreateWithCopiedBuffer("asdf", 4));
EXPECT_FALSE(JSONWriter::Write(binary_list, &output_js));
EXPECT_TRUE(JSONWriter::WriteWithOptions(
« no previous file with comments | « base/files/important_file_writer_unittest.cc ('k') | base/message_loop/message_pump_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698