Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 """Chromium presubmit script for src/extensions/common. | |
| 6 | |
| 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | |
| 8 for more details on the presubmit API built into depot_tools. | |
| 9 """ | |
| 10 | |
| 11 import sys | |
| 12 | |
| 13 _API_PAIRS = { | |
| 14 'extensions/common/api/bluetooth.idl': 'ui/externs/bluetooth.js', | |
|
Devlin
2016/02/22 23:26:14
Just adding one for now.
Step 2: add all the ones
Dan Beam
2016/02/23 03:15:23
nit: use os.path.join() maybe?
Devlin
2016/02/23 23:12:39
Good call, done.
| |
| 15 #TODO(devlin): Add more! | |
| 16 } | |
| 17 | |
| 18 def _CheckExterns(input_api, output_api): | |
| 19 original_sys_path = sys.path | |
| 20 | |
| 21 try: | |
| 22 sys.path.append(input_api.PresubmitLocalPath()) | |
| 23 from externs_checker import ExternsChecker | |
| 24 finally: | |
| 25 sys.path = original_sys_path | |
| 26 | |
| 27 return ExternsChecker(input_api, output_api, _API_PAIRS).RunChecks() | |
| 28 | |
| 29 def CheckChangeOnUpload(input_api, output_api): | |
| 30 return _CheckExterns(input_api, output_api) | |
| OLD | NEW |