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 "components/json_schema/json_schema_validator.h" | 5 #include "components/json_schema/json_schema_validator.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <algorithm> | 9 #include <algorithm> |
8 #include <cfloat> | 10 #include <cfloat> |
9 #include <cmath> | 11 #include <cmath> |
10 #include <vector> | 12 #include <vector> |
11 | 13 |
12 #include "base/json/json_reader.h" | 14 #include "base/json/json_reader.h" |
13 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/macros.h" |
14 #include "base/memory/scoped_vector.h" | 17 #include "base/memory/scoped_vector.h" |
15 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
16 #include "base/strings/string_util.h" | 19 #include "base/strings/string_util.h" |
17 #include "base/strings/stringprintf.h" | 20 #include "base/strings/stringprintf.h" |
18 #include "base/values.h" | 21 #include "base/values.h" |
19 #include "components/json_schema/json_schema_constants.h" | 22 #include "components/json_schema/json_schema_constants.h" |
20 #include "third_party/re2/src/re2/re2.h" | 23 #include "third_party/re2/src/re2/re2.h" |
21 | 24 |
22 namespace schema = json_schema_constants; | 25 namespace schema = json_schema_constants; |
23 | 26 |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 | 839 |
837 if (*additional_properties_schema) { | 840 if (*additional_properties_schema) { |
838 std::string additional_properties_type(schema::kAny); | 841 std::string additional_properties_type(schema::kAny); |
839 CHECK((*additional_properties_schema)->GetString( | 842 CHECK((*additional_properties_schema)->GetString( |
840 schema::kType, &additional_properties_type)); | 843 schema::kType, &additional_properties_type)); |
841 return additional_properties_type == schema::kAny; | 844 return additional_properties_type == schema::kAny; |
842 } else { | 845 } else { |
843 return default_allow_additional_properties_; | 846 return default_allow_additional_properties_; |
844 } | 847 } |
845 } | 848 } |
OLD | NEW |