Chromium Code Reviews| Index: components/policy/core/common/schema_internal.h |
| diff --git a/components/policy/core/common/schema_internal.h b/components/policy/core/common/schema_internal.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..64eda4d5bf598aaba2114b483dfd06f80abaaf23 |
| --- /dev/null |
| +++ b/components/policy/core/common/schema_internal.h |
| @@ -0,0 +1,46 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_POLICY_CORE_COMMON_SCHEMA_INTERNAL_H_ |
| +#define COMPONENTS_POLICY_CORE_COMMON_SCHEMA_INTERNAL_H_ |
| + |
| +#include "base/values.h" |
| +#include "components/policy/policy_export.h" |
| + |
| +namespace policy { |
| + |
| +namespace schema { |
| + |
| +namespace internal { |
| + |
| +// These types are used internally by the PolicySchema parser, and by the |
| +// compile-time code generator. They shouldn't be used directly. |
| + |
| +struct POLICY_EXPORT SchemaNode { |
| + base::Value::Type type; |
| + |
| + // 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.
|
| + // 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
|
| + // Otherwise it's NULL. |
| + const void* extra; |
| +}; |
| + |
| +struct POLICY_EXPORT PropertyNode { |
| + const char* key; |
| + const SchemaNode* schema; |
| +}; |
| + |
| +struct POLICY_EXPORT PropertiesNode { |
| + const PropertyNode* begin; |
| + const PropertyNode* end; |
| + const SchemaNode* additional; |
| +}; |
| + |
| +} // namespace internal |
| + |
| +} // namespace schema |
| + |
| +} // namespace policy |
| + |
| +#endif // COMPONENTS_POLICY_CORE_COMMON_SCHEMA_INTERNAL_H_ |