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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 } | 159 } |
160 | 160 |
161 template <class T> | 161 template <class T> |
162 scoped_ptr<Value> CreateValueFromOptionalArray( | 162 scoped_ptr<Value> CreateValueFromOptionalArray( |
163 const scoped_ptr<std::vector<T> >& from) { | 163 const scoped_ptr<std::vector<T> >& from) { |
164 if (from.get()) | 164 if (from.get()) |
165 return CreateValueFromArray(*from); | 165 return CreateValueFromArray(*from); |
166 return scoped_ptr<Value>(); | 166 return scoped_ptr<Value>(); |
167 } | 167 } |
168 | 168 |
169 } // namespace api_util | 169 } // namespace util |
170 } // namespace extensions | 170 } // namespace json_schema_compiler |
171 | 171 |
172 #endif // TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__ | 172 #endif // TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__ |
OLD | NEW |