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

Issue 22364011: policy: generate JSON schema at build time as a string constant. (Closed)

Created:
7 years, 4 months ago by dconnelly
Modified:
7 years ago
Reviewers:
Joao da Silva
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

policy: generate JSON schema at build time as a string constant. This is CL 1 of 3 that loads policy on Windows using the schema. The policy generator now creates a constant kPolicyJsonSchema in policy_constants.h that defines the expected structure of Chrome policy data. This schema is generated from the existing policy templates file. BUG=270667

Patch Set 1 #

Patch Set 2 : remove cruft #

Patch Set 3 : rebase #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -1 line) Patch
M chrome/tools/build/generate_policy_source.py View 1 4 chunks +16 lines, -1 line 3 comments Download

Messages

Total messages: 3 (0 generated)
dconnelly
7 years, 3 months ago (2013-09-03 16:30:03 UTC) #1
Joao da Silva
Looks good. Please add a unittest at //chrome/browser/policy verifying that PolicySchema::Parse successfully parses policy::kPolicyJsonSchema. The ...
7 years, 3 months ago (2013-09-11 11:43:37 UTC) #2
Joao da Silva
7 years, 3 months ago (2013-09-11 11:59:00 UTC) #3
https://codereview.chromium.org/22364011/diff/18001/chrome/tools/build/genera...
File chrome/tools/build/generate_policy_source.py (right):

https://codereview.chromium.org/22364011/diff/18001/chrome/tools/build/genera...
chrome/tools/build/generate_policy_source.py:324:
json.dumps(json.dumps(schema)))
pass separators=(',', ':') to these 2 calls. It will remove the whitespaces
after commas and colons, and save some more bytes.

Powered by Google App Engine
This is Rietveld 408576698