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

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: POLICY_EXPORT for Schema::Iterator 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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698