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

Unified Diff: tools/json_schema_compiler/util.h

Issue 276603003: Support converting referenced enum array into string. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win compile error Created 6 years, 7 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/arrays_unittest.cc ('k') | tools/json_schema_compiler/util_cc_helper.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/util.h
diff --git a/tools/json_schema_compiler/util.h b/tools/json_schema_compiler/util.h
index 5cc4008867f7eaea9e8f875676652c7e67d64111..228ecedba6b5023a99ec66de5ba5a7abe0c8d506 100644
--- a/tools/json_schema_compiler/util.h
+++ b/tools/json_schema_compiler/util.h
@@ -173,24 +173,6 @@ scoped_ptr<base::Value> CreateValueFromOptionalArray(
return scoped_ptr<base::Value>();
}
-template <class TParent, class T>
-scoped_ptr<base::Value> CreateValueFromEnumArray(const std::vector<T>& from) {
- base::ListValue* list = new base::ListValue();
- for (typename std::vector<T>::const_iterator it = from.begin();
- it != from.end(); ++it) {
- list->AppendString(TParent::ToString(*it));
- }
- return scoped_ptr<base::Value>(list);
-}
-
-template <class TParent, class T>
-scoped_ptr<base::Value> CreateValueFromOptionalEnumArray(
- const scoped_ptr<std::vector<T> >& from) {
- if (from.get())
- return CreateValueFromEnumArray<TParent>(*from);
- return scoped_ptr<base::Value>();
-}
-
std::string ValueTypeToString(base::Value::Type type);
} // namespace util
« no previous file with comments | « tools/json_schema_compiler/test/arrays_unittest.cc ('k') | tools/json_schema_compiler/util_cc_helper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698