OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__ | 5 #ifndef TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__ |
6 #define TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__ | 6 #define TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 } | 175 } |
176 | 176 |
177 template <class T> | 177 template <class T> |
178 scoped_ptr<Value> CreateValueFromOptionalArray( | 178 scoped_ptr<Value> CreateValueFromOptionalArray( |
179 const scoped_ptr<std::vector<T> >& from) { | 179 const scoped_ptr<std::vector<T> >& from) { |
180 if (from.get()) | 180 if (from.get()) |
181 return CreateValueFromArray(*from); | 181 return CreateValueFromArray(*from); |
182 return scoped_ptr<Value>(); | 182 return scoped_ptr<Value>(); |
183 } | 183 } |
184 | 184 |
| 185 std::string ValueTypeToString(Value::Type type); |
| 186 |
185 } // namespace util | 187 } // namespace util |
186 } // namespace json_schema_compiler | 188 } // namespace json_schema_compiler |
187 | 189 |
188 #endif // TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__ | 190 #endif // TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__ |
OLD | NEW |