| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Chromium presubmit script for src/extensions/common. | 5 """Chromium presubmit script for src/extensions/common. |
| 6 | 6 |
| 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
| 8 for more details on the presubmit API built into depot_tools. | 8 for more details on the presubmit API built into depot_tools. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 join = input_api.os_path.join | 23 join = input_api.os_path.join |
| 24 api_root = input_api.PresubmitLocalPath() | 24 api_root = input_api.PresubmitLocalPath() |
| 25 externs_root = join(api_root, '..', '..', '..', 'third_party', | 25 externs_root = join(api_root, '..', '..', '..', 'third_party', |
| 26 'closure_compiler', 'externs') | 26 'closure_compiler', 'externs') |
| 27 | 27 |
| 28 api_pairs = { | 28 api_pairs = { |
| 29 join(api_root, 'bluetooth.idl'): join(externs_root, 'bluetooth.js'), | 29 join(api_root, 'bluetooth.idl'): join(externs_root, 'bluetooth.js'), |
| 30 join(api_root, 'metrics_private.json'): | 30 join(api_root, 'metrics_private.json'): |
| 31 join(externs_root, 'metrics_private.js'), | 31 join(externs_root, 'metrics_private.js'), |
| 32 join(api_root, 'mime_handler_private.idl'): |
| 33 join(externs_root, 'mime_handler_private.js'), |
| 32 # TODO(rdevlin.cronin): Add more! | 34 # TODO(rdevlin.cronin): Add more! |
| 33 } | 35 } |
| 34 | 36 |
| 35 return ExternsChecker(input_api, output_api, api_pairs).RunChecks() | 37 return ExternsChecker(input_api, output_api, api_pairs).RunChecks() |
| 36 | 38 |
| 37 | 39 |
| 38 def CheckChangeOnUpload(input_api, output_api): | 40 def CheckChangeOnUpload(input_api, output_api): |
| 39 return _CheckExterns(input_api, output_api) | 41 return _CheckExterns(input_api, output_api) |
| OLD | NEW |