Chromium Code Reviews| 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 | |
| 13 namespace schema { | |
| 14 | |
| 15 namespace internal { | |
| 16 | |
| 17 // These types are used internally by the PolicySchema parser, and by the | |
| 18 // compile-time code generator. They shouldn't be used directly. | |
| 19 | |
| 20 struct POLICY_EXPORT SchemaNode { | |
| 21 base::Value::Type type; | |
| 22 | |
| 23 // If type is TYPE_LIST then this is a SchemaNode*. | |
|
Mattias Nissler (ping if slow)
2013/09/13 12:56:48
... describing the element type.
Joao da Silva
2013/09/13 14:02:54
Done.
| |
| 24 // If type is TYPE_DICTIONARY then this is a PropertiesNode*. | |
|
Mattias Nissler (ping if slow)
2013/09/13 12:56:48
Sounds like a union. I think that's justified here
Joao da Silva
2013/09/13 14:02:54
Exactly. This was a union initially, but unfortuna
| |
| 25 // Otherwise it's NULL. | |
| 26 const void* extra; | |
| 27 }; | |
| 28 | |
| 29 struct POLICY_EXPORT PropertyNode { | |
| 30 const char* key; | |
| 31 const SchemaNode* schema; | |
| 32 }; | |
| 33 | |
| 34 struct POLICY_EXPORT PropertiesNode { | |
| 35 const PropertyNode* begin; | |
| 36 const PropertyNode* end; | |
| 37 const SchemaNode* additional; | |
| 38 }; | |
| 39 | |
| 40 } // namespace internal | |
| 41 | |
| 42 } // namespace schema | |
| 43 | |
| 44 } // namespace policy | |
| 45 | |
| 46 #endif // COMPONENTS_POLICY_CORE_COMMON_SCHEMA_INTERNAL_H_ | |
| OLD | NEW |