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

Unified Diff: tools/json_schema_compiler/test/additional_properties_unittest.cc

Issue 2058233002: Rewrite simple uses of base::ListValue::Append() taking a raw pointer var. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: less comments more ownership Created 4 years, 6 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 | « pdf/pdfium/pdfium_page.cc ('k') | tools/json_schema_compiler/test/arrays_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/test/additional_properties_unittest.cc
diff --git a/tools/json_schema_compiler/test/additional_properties_unittest.cc b/tools/json_schema_compiler/test/additional_properties_unittest.cc
index 1d1750ab3b87e3175f49cbc16518d9fb9e1ff14f..4e2476b0e002f00529f327b532b42e07b648fdf8 100644
--- a/tools/json_schema_compiler/test/additional_properties_unittest.cc
+++ b/tools/json_schema_compiler/test/additional_properties_unittest.cc
@@ -5,6 +5,7 @@
#include "tools/json_schema_compiler/test/additional_properties.h"
#include <memory>
+#include <utility>
#include "testing/gtest/include/gtest/gtest.h"
@@ -59,10 +60,10 @@ TEST(JsonSchemaCompilerAdditionalPropertiesTest,
base::ListValue expected;
{
- base::DictionaryValue* dict = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetInteger("integer", 5);
dict->SetString("key", "value");
- expected.Append(dict);
+ expected.Append(std::move(dict));
}
EXPECT_TRUE(base::Value::Equals(
« no previous file with comments | « pdf/pdfium/pdfium_page.cc ('k') | tools/json_schema_compiler/test/arrays_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698