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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..025a4373ee75cc50475c824c380f09c635d3e665
--- /dev/null
+++ b/components/policy/core/common/schema_internal.h
@@ -0,0 +1,45 @@
+// 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 internal {
+
+// These types are used internally by the SchemaOwner 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* describing the
+ // element type.
+ //
+ // If |type| is TYPE_DICTIONARY then this is a PropertiesNode* that can
+ // contain any number of named properties and optionally a SchemaNode* for
+ // additional properties.
+ //
+ // This is NULL if |type| has any other values.
+ 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 policy
+
+#endif // COMPONENTS_POLICY_CORE_COMMON_SCHEMA_INTERNAL_H_
« 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