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

Unified Diff: tools/json_schema_compiler/util.h

Issue 11827026: Overhaul JSON Schema Compiler to support a number of features required to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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/objects_unittest.cc ('k') | tools/json_schema_compiler/util.cc » ('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 6943590050071c726893087ccb8f849af8ff6d44..425487d3c652d053acb39af56e73aed2a7835974 100644
--- a/tools/json_schema_compiler/util.h
+++ b/tools/json_schema_compiler/util.h
@@ -14,10 +14,6 @@
namespace json_schema_compiler {
-namespace any {
-class Any;
-}
-
namespace util {
// Creates a new item at |out| from |from|[|index|]. These are used by template
@@ -26,10 +22,12 @@ bool GetItemFromList(const ListValue& from, int index, int* out);
bool GetItemFromList(const ListValue& from, int index, bool* out);
bool GetItemFromList(const ListValue& from, int index, double* out);
bool GetItemFromList(const ListValue& from, int index, std::string* out);
-bool GetItemFromList(const ListValue& from, int index,
- linked_ptr<base::DictionaryValue>* out);
-bool GetItemFromList(const ListValue& from, int index,
- linked_ptr<any::Any>* out);
+bool GetItemFromList(const ListValue& from,
+ int index,
+ linked_ptr<base::Value>* out);
+bool GetItemFromList(const ListValue& from,
+ int index,
+ linked_ptr<base::DictionaryValue>* out);
// This template is used for types generated by tools/json_schema_compiler.
template<class T>
@@ -134,10 +132,10 @@ void AddItemToList(const int from, base::ListValue* out);
void AddItemToList(const bool from, base::ListValue* out);
void AddItemToList(const double from, base::ListValue* out);
void AddItemToList(const std::string& from, base::ListValue* out);
+void AddItemToList(const linked_ptr<base::Value>& from,
+ base::ListValue* out);
void AddItemToList(const linked_ptr<base::DictionaryValue>& from,
- base::ListValue* out);
-void AddItemToList(const linked_ptr<any::Any>& from,
- base::ListValue* out);
+ base::ListValue* out);
// This template is used for types generated by tools/json_schema_compiler.
template<class T>
@@ -170,8 +168,7 @@ void PopulateListFromOptionalArray(
}
template <class T>
-scoped_ptr<Value> CreateValueFromArray(
- const std::vector<T>& from) {
+scoped_ptr<Value> CreateValueFromArray(const std::vector<T>& from) {
base::ListValue* list = new base::ListValue();
PopulateListFromArray(from, list);
return scoped_ptr<Value>(list);
« no previous file with comments | « tools/json_schema_compiler/test/objects_unittest.cc ('k') | tools/json_schema_compiler/util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698