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

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

Issue 1869503004: Convert //tools to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, change iwyu fixes for converted directories to include <memory> Created 4 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
Index: tools/json_schema_compiler/test/test_util.h
diff --git a/tools/json_schema_compiler/test/test_util.h b/tools/json_schema_compiler/test/test_util.h
index 7590004a7de139a4f0f01d44e9a17ea8748357ff..d82e90512d5c1dc38acc53296283ab3c8f672a4b 100644
--- a/tools/json_schema_compiler/test/test_util.h
+++ b/tools/json_schema_compiler/test/test_util.h
@@ -5,14 +5,15 @@
#ifndef TOOLS_JSON_SCHEMA_COMPILER_TEST_TEST_UTIL_H_
#define TOOLS_JSON_SCHEMA_COMPILER_TEST_TEST_UTIL_H_
-#include "base/memory/scoped_ptr.h"
+#include <memory>
+
#include "base/strings/string_piece.h"
#include "base/values.h"
namespace json_schema_compiler {
namespace test_util {
-scoped_ptr<base::Value> ReadJson(const base::StringPiece& json);
+std::unique_ptr<base::Value> ReadJson(const base::StringPiece& json);
template <typename T>
std::vector<T> Vector(const T& a) {
@@ -33,21 +34,24 @@ std::vector<T> Vector(const T& a, const T& b, const T& c) {
return arr;
}
-scoped_ptr<base::ListValue> List(base::Value* a);
-scoped_ptr<base::ListValue> List(base::Value* a, base::Value* b);
-scoped_ptr<base::ListValue> List(base::Value* a,
- base::Value* b,
- base::Value* c);
-
-scoped_ptr<base::DictionaryValue> Dictionary(
- const std::string& ak, base::Value* av);
-scoped_ptr<base::DictionaryValue> Dictionary(
- const std::string& ak, base::Value* av,
- const std::string& bk, base::Value* bv);
-scoped_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::ListValue> List(base::Value* a);
+std::unique_ptr<base::ListValue> List(base::Value* a, base::Value* b);
+std::unique_ptr<base::ListValue> List(base::Value* a,
+ base::Value* b,
+ base::Value* c);
+
+std::unique_ptr<base::DictionaryValue> Dictionary(const std::string& ak,
+ base::Value* av);
+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> Dictionary(const std::string& ak,
+ base::Value* av,
+ const std::string& bk,
+ base::Value* bv,
+ const std::string& ck,
+ base::Value* cv);
} // namespace test_util
} // namespace json_schema_compiler
« no previous file with comments | « tools/json_schema_compiler/test/simple_api_unittest.cc ('k') | tools/json_schema_compiler/test/test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698