Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Side by Side Diff: components/policy/core/common/schema_internal.h

Issue 23851022: Added new policy Schema classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW
« no previous file with comments | « components/policy/core/common/schema.cc ('k') | components/policy/core/common/schema_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698