Index: tools/json_schema_compiler/test/test_util.cc |
diff --git a/tools/json_schema_compiler/test/test_util.cc b/tools/json_schema_compiler/test/test_util.cc |
index 60744ba57b2e27297a01f93dacf72a9cfa18ce71..01f9215a745ba781351400554d6e4766de6e7c3f 100644 |
--- a/tools/json_schema_compiler/test/test_util.cc |
+++ b/tools/json_schema_compiler/test/test_util.cc |
@@ -41,28 +41,32 @@ std::unique_ptr<base::ListValue> List(base::Value* a, |
return list; |
} |
-std::unique_ptr<base::DictionaryValue> Dictionary(const std::string& ak, |
- base::Value* av) { |
- std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); |
- dict->SetWithoutPathExpansion(ak, av); |
+std::unique_ptr<base::DictionaryValue> Dictionary( |
+ const std::string& ak, |
+ std::unique_ptr<base::Value> av) { |
+ auto dict = base::MakeUnique<base::DictionaryValue>(); |
+ dict->SetWithoutPathExpansion(ak, std::move(av)); |
return dict; |
} |
-std::unique_ptr<base::DictionaryValue> Dictionary(const std::string& ak, |
- base::Value* av, |
- const std::string& bk, |
- base::Value* bv) { |
- std::unique_ptr<base::DictionaryValue> dict = Dictionary(ak, av); |
- dict->SetWithoutPathExpansion(bk, bv); |
+std::unique_ptr<base::DictionaryValue> Dictionary( |
+ const std::string& ak, |
+ std::unique_ptr<base::Value> av, |
+ const std::string& bk, |
+ std::unique_ptr<base::Value> bv) { |
+ std::unique_ptr<base::DictionaryValue> dict = Dictionary(ak, std::move(av)); |
+ dict->SetWithoutPathExpansion(bk, std::move(bv)); |
return dict; |
} |
-std::unique_ptr<base::DictionaryValue> Dictionary(const std::string& ak, |
- base::Value* av, |
- const std::string& bk, |
- base::Value* bv, |
- const std::string& ck, |
- base::Value* cv) { |
- std::unique_ptr<base::DictionaryValue> dict = Dictionary(ak, av, bk, bv); |
- dict->SetWithoutPathExpansion(ck, cv); |
+std::unique_ptr<base::DictionaryValue> Dictionary( |
+ const std::string& ak, |
+ std::unique_ptr<base::Value> av, |
+ const std::string& bk, |
+ std::unique_ptr<base::Value> bv, |
+ const std::string& ck, |
+ std::unique_ptr<base::Value> cv) { |
+ std::unique_ptr<base::DictionaryValue> dict = |
+ Dictionary(ak, std::move(av), bk, std::move(bv)); |
+ dict->SetWithoutPathExpansion(ck, std::move(cv)); |
return dict; |
} |