OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_SCHEMA_INTERNAL_H_ |
| 6 #define COMPONENTS_POLICY_CORE_COMMON_SCHEMA_INTERNAL_H_ |
| 7 |
| 8 #include "base/values.h" |
| 9 #include "components/policy/policy_export.h" |
| 10 |
| 11 namespace policy { |
| 12 namespace internal { |
| 13 |
| 14 // These types are used internally by the SchemaOwner parser, and by the |
| 15 // compile-time code generator. They shouldn't be used directly. |
| 16 |
| 17 struct POLICY_EXPORT SchemaNode { |
| 18 base::Value::Type type; |
| 19 |
| 20 // If |type| is TYPE_LIST then this is a SchemaNode* describing the |
| 21 // element type. |
| 22 // |
| 23 // If |type| is TYPE_DICTIONARY then this is a PropertiesNode* that can |
| 24 // contain any number of named properties and optionally a SchemaNode* for |
| 25 // additional properties. |
| 26 // |
| 27 // This is NULL if |type| has any other values. |
| 28 const void* extra; |
| 29 }; |
| 30 |
| 31 struct POLICY_EXPORT PropertyNode { |
| 32 const char* key; |
| 33 const SchemaNode* schema; |
| 34 }; |
| 35 |
| 36 struct POLICY_EXPORT PropertiesNode { |
| 37 const PropertyNode* begin; |
| 38 const PropertyNode* end; |
| 39 const SchemaNode* additional; |
| 40 }; |
| 41 |
| 42 } // namespace internal |
| 43 } // namespace policy |
| 44 |
| 45 #endif // COMPONENTS_POLICY_CORE_COMMON_SCHEMA_INTERNAL_H_ |
OLD | NEW |