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

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

Issue 2843813002: Remove SetWithoutPathExpansion (Closed)
Patch Set: Fix CrOS Error Created 3 years, 8 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 | « tools/json_schema_compiler/test/test_util.h ('k') | ui/app_list/search/history_data_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « tools/json_schema_compiler/test/test_util.h ('k') | ui/app_list/search/history_data_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698