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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 } | 166 } |
167 | 167 |
168 template <class T> | 168 template <class T> |
169 scoped_ptr<base::Value> CreateValueFromOptionalArray( | 169 scoped_ptr<base::Value> CreateValueFromOptionalArray( |
170 const scoped_ptr<std::vector<T> >& from) { | 170 const scoped_ptr<std::vector<T> >& from) { |
171 if (from.get()) | 171 if (from.get()) |
172 return CreateValueFromArray(*from); | 172 return CreateValueFromArray(*from); |
173 return scoped_ptr<base::Value>(); | 173 return scoped_ptr<base::Value>(); |
174 } | 174 } |
175 | 175 |
176 std::string ValueTypeToString(Value::Type type); | 176 std::string ValueTypeToString(base::Value::Type type); |
177 | 177 |
178 } // namespace util | 178 } // namespace util |
179 } // namespace json_schema_compiler | 179 } // namespace json_schema_compiler |
180 | 180 |
181 #endif // TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__ | 181 #endif // TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__ |
OLD | NEW |