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

Issue 94043003: Ignore unknown attributes when parsing JSON schemas. (Closed)

Created:
7 years ago by Joao da Silva
Modified:
7 years ago
CC:
chromium-reviews, Mattias Nissler (ping if slow)
Visibility:
Public.

Description

Ignore unknown attributes when parsing JSON schemas. JSON schemas are used by extensions that support enterprise management, to declare the policies that they support. The current parser rejects schemas with unknown attributes; this CL lifts that restriction for 2 reasons: - the JSON schema spec does not mandate this behavior for validators - it restricts future extensions to this format BUG=108992 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=239407

Patch Set 1 #

Patch Set 2 : added flag #

Total comments: 3

Patch Set 3 : added Options enum #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -14 lines) Patch
M components/json_schema/json_schema_validator.h View 1 2 2 chunks +13 lines, -0 lines 0 comments Download
M components/json_schema/json_schema_validator.cc View 1 2 9 chunks +22 lines, -9 lines 0 comments Download
M components/json_schema/json_schema_validator_unittest.cc View 1 2 2 chunks +13 lines, -2 lines 0 comments Download
M components/policy/core/common/schema.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M components/policy/core/common/schema_unittest.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Joao da Silva
@Benjamin: please have a look @Mattias: FYI, as discussed earlier to support future changes, if ...
7 years ago (2013-12-05 19:58:52 UTC) #1
not at google - send to devlin
In the case of an extension installed by policy, it'd be likely that the admin ...
7 years ago (2013-12-06 15:50:09 UTC) #2
Joao da Silva
On 2013/12/06 15:50:09, kalman wrote: > In the case of an extension installed by policy, ...
7 years ago (2013-12-06 18:08:57 UTC) #3
not at google - send to devlin
lgtm https://codereview.chromium.org/94043003/diff/20001/components/json_schema/json_schema_validator.cc File components/json_schema/json_schema_validator.cc (right): https://codereview.chromium.org/94043003/diff/20001/components/json_schema/json_schema_validator.cc#newcode160 components/json_schema/json_schema_validator.cc:160: if (!ignore_unknown_attrs) { i.e. an option such that ...
7 years ago (2013-12-06 18:12:25 UTC) #4
Joao da Silva
https://codereview.chromium.org/94043003/diff/20001/components/json_schema/json_schema_validator.h File components/json_schema/json_schema_validator.h (right): https://codereview.chromium.org/94043003/diff/20001/components/json_schema/json_schema_validator.h#newcode111 components/json_schema/json_schema_validator.h:111: bool ignore_unknown_attributes, On 2013/12/06 18:12:26, kalman wrote: > pls ...
7 years ago (2013-12-08 08:41:19 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/94043003/40001
7 years ago (2013-12-08 08:41:27 UTC) #6
commit-bot: I haz the power
7 years ago (2013-12-08 22:23:47 UTC) #7
Message was sent while issue was closed.
Change committed as 239407

Powered by Google App Engine
This is Rietveld 408576698