Chromium Code Reviews| 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 30 matching lines...) Expand all Loading... | |
| 41 'DisablePrintPreview', | 41 'DisablePrintPreview', |
| 42 'DisableSafeBrowsingProceedAnyway', | 42 'DisableSafeBrowsingProceedAnyway', |
| 43 'DisableScreenshots', | 43 'DisableScreenshots', |
| 44 'DisableSpdy', | 44 'DisableSpdy', |
| 45 'DisableSSLRecordSplitting', | 45 'DisableSSLRecordSplitting', |
| 46 'ExternalStorageDisabled', | 46 'ExternalStorageDisabled', |
| 47 'GDataDisabled', | 47 'GDataDisabled', |
| 48 'GDataDisabledOverCellular', | 48 'GDataDisabledOverCellular', |
| 49 'SavingBrowserHistoryDisabled', | 49 'SavingBrowserHistoryDisabled', |
| 50 'SyncDisabled', | 50 'SyncDisabled', |
| 51 'AudioOutputDisabled', | |
| 52 'AudioCaptureDisabled', | |
|
Mattias Nissler (ping if slow)
2012/08/28 12:24:24
Don't! Make it AudioOutputEnabled and AudioCapture
pastarmovj
2012/08/28 15:11:50
Fine. I wanted to keep all those policies in the s
| |
| 51 ] | 53 ] |
| 52 | 54 |
| 53 class PolicyTemplateChecker(object): | 55 class PolicyTemplateChecker(object): |
| 54 | 56 |
| 55 def __init__(self): | 57 def __init__(self): |
| 56 self.error_count = 0 | 58 self.error_count = 0 |
| 57 self.warning_count = 0 | 59 self.warning_count = 0 |
| 58 self.num_policies = 0 | 60 self.num_policies = 0 |
| 59 self.num_groups = 0 | 61 self.num_groups = 0 |
| 60 self.num_policies_in_groups = 0 | 62 self.num_policies_in_groups = 0 |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 465 if filename is None: | 467 if filename is None: |
| 466 if len(args) != 2: | 468 if len(args) != 2: |
| 467 parser.print_help() | 469 parser.print_help() |
| 468 sys.exit(1) | 470 sys.exit(1) |
| 469 filename = args[1] | 471 filename = args[1] |
| 470 return self.Main(filename, options) | 472 return self.Main(filename, options) |
| 471 | 473 |
| 472 | 474 |
| 473 if __name__ == '__main__': | 475 if __name__ == '__main__': |
| 474 sys.exit(PolicyTemplateChecker().Run(sys.argv)) | 476 sys.exit(PolicyTemplateChecker().Run(sys.argv)) |
| OLD | NEW |