OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/common/policy/policy_schema.h" | 5 #include "chrome/common/policy/policy_schema.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "chrome/common/json_schema/json_schema_constants.h" | 10 #include "components/json_schema/json_schema_constants.h" |
11 #include "chrome/common/json_schema/json_schema_validator.h" | 11 #include "components/json_schema/json_schema_validator.h" |
12 | 12 |
13 namespace policy { | 13 namespace policy { |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 const char kJSONSchemaVersion[] = "http://json-schema.org/draft-03/schema#"; | 17 const char kJSONSchemaVersion[] = "http://json-schema.org/draft-03/schema#"; |
18 | 18 |
19 // Describes the properties of a TYPE_DICTIONARY policy schema. | 19 // Describes the properties of a TYPE_DICTIONARY policy schema. |
20 class DictionaryPolicySchema : public PolicySchema { | 20 class DictionaryPolicySchema : public PolicySchema { |
21 public: | 21 public: |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 dict->HasKey(json_schema_constants::kPatternProperties)) { | 235 dict->HasKey(json_schema_constants::kPatternProperties)) { |
236 *error = "\"additionalProperties\" and \"patternProperties\" are not " | 236 *error = "\"additionalProperties\" and \"patternProperties\" are not " |
237 "supported at the main schema."; | 237 "supported at the main schema."; |
238 return scoped_ptr<PolicySchema>(); | 238 return scoped_ptr<PolicySchema>(); |
239 } | 239 } |
240 | 240 |
241 return ParseSchema(*dict, error); | 241 return ParseSchema(*dict, error); |
242 } | 242 } |
243 | 243 |
244 } // namespace policy | 244 } // namespace policy |
OLD | NEW |