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

Side by Side Diff: components/json_schema/json_schema_validator.h

Issue 1592403002: update obsolete code.google.com documentation links (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 years, 10 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
OLDNEW
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 #ifndef COMPONENTS_JSON_SCHEMA_JSON_SCHEMA_VALIDATOR_H_ 5 #ifndef COMPONENTS_JSON_SCHEMA_JSON_SCHEMA_VALIDATOR_H_
6 #define COMPONENTS_JSON_SCHEMA_JSON_SCHEMA_VALIDATOR_H_ 6 #define COMPONENTS_JSON_SCHEMA_JSON_SCHEMA_VALIDATOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // - hidden 45 // - hidden
46 // 46 //
47 // There are also these departures from the JSON Schema proposal: 47 // There are also these departures from the JSON Schema proposal:
48 // - null counts as 'unspecified' for optional values 48 // - null counts as 'unspecified' for optional values
49 // - added the 'choices' property, to allow specifying a list of possible types 49 // - added the 'choices' property, to allow specifying a list of possible types
50 // for a value 50 // for a value
51 // - by default an "object" typed schema does not allow additional properties. 51 // - by default an "object" typed schema does not allow additional properties.
52 // if present, "additionalProperties" is to be a schema against which all 52 // if present, "additionalProperties" is to be a schema against which all
53 // additional properties will be validated. 53 // additional properties will be validated.
54 // - regular expression supports all syntaxes that re2 accepts. 54 // - regular expression supports all syntaxes that re2 accepts.
55 // See https://code.google.com/p/re2/wiki/Syntax for details. 55 // See https://github.com/google/re2/blob/master/doc/syntax.txt for details.
56 //============================================================================== 56 //==============================================================================
57 class JSONSchemaValidator { 57 class JSONSchemaValidator {
58 public: 58 public:
59 // Details about a validation error. 59 // Details about a validation error.
60 struct Error { 60 struct Error {
61 Error(); 61 Error();
62 62
63 explicit Error(const std::string& message); 63 explicit Error(const std::string& message);
64 64
65 Error(const std::string& path, const std::string& message); 65 Error(const std::string& path, const std::string& message);
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 bool default_allow_additional_properties_; 245 bool default_allow_additional_properties_;
246 246
247 // Errors accumulated since the last call to Validate(). 247 // Errors accumulated since the last call to Validate().
248 std::vector<Error> errors_; 248 std::vector<Error> errors_;
249 249
250 250
251 DISALLOW_COPY_AND_ASSIGN(JSONSchemaValidator); 251 DISALLOW_COPY_AND_ASSIGN(JSONSchemaValidator);
252 }; 252 };
253 253
254 #endif // COMPONENTS_JSON_SCHEMA_JSON_SCHEMA_VALIDATOR_H_ 254 #endif // COMPONENTS_JSON_SCHEMA_JSON_SCHEMA_VALIDATOR_H_
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/test/unittest_util.py ('k') | components/nacl/loader/nacl_helper_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698