OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 ''' | 6 ''' |
7 Checks a policy_templates.json file for conformity to its syntax specification. | 7 Checks a policy_templates.json file for conformity to its syntax specification. |
8 ''' | 8 ''' |
9 | 9 |
10 import json | 10 import json |
(...skipping 25 matching lines...) Expand all Loading... |
36 'DeveloperToolsDisabled', | 36 'DeveloperToolsDisabled', |
37 'DeviceAutoUpdateDisabled', | 37 'DeviceAutoUpdateDisabled', |
38 'Disable3DAPIs', | 38 'Disable3DAPIs', |
39 'DisableAuthNegotiateCnameLookup', | 39 'DisableAuthNegotiateCnameLookup', |
40 'DisablePluginFinder', | 40 'DisablePluginFinder', |
41 'DisablePrintPreview', | 41 'DisablePrintPreview', |
42 'DisableSafeBrowsingProceedAnyway', | 42 'DisableSafeBrowsingProceedAnyway', |
43 'DisableScreenshots', | 43 'DisableScreenshots', |
44 'DisableSpdy', | 44 'DisableSpdy', |
45 'DisableSSLRecordSplitting', | 45 'DisableSSLRecordSplitting', |
46 'ExternalStorageDisabledforrealz', | 46 'ExternalStorageDisabled', |
47 'GDataDisabled', | 47 'GDataDisabled', |
48 'GDataDisabledOverCellular', | 48 'GDataDisabledOverCellular', |
49 'SavingBrowserHistoryDisabled', | 49 'SavingBrowserHistoryDisabled', |
50 'SyncDisabled', | 50 'SyncDisabled', |
51 ] | 51 ] |
52 | 52 |
53 class PolicyTemplateChecker(object): | 53 class PolicyTemplateChecker(object): |
54 | 54 |
55 def __init__(self): | 55 def __init__(self): |
56 self.error_count = 0 | 56 self.error_count = 0 |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 if filename is None: | 465 if filename is None: |
466 if len(args) != 2: | 466 if len(args) != 2: |
467 parser.print_help() | 467 parser.print_help() |
468 sys.exit(1) | 468 sys.exit(1) |
469 filename = args[1] | 469 filename = args[1] |
470 return self.Main(filename, options) | 470 return self.Main(filename, options) |
471 | 471 |
472 | 472 |
473 if __name__ == '__main__': | 473 if __name__ == '__main__': |
474 sys.exit(PolicyTemplateChecker().Run(sys.argv)) | 474 sys.exit(PolicyTemplateChecker().Run(sys.argv)) |
OLD | NEW |