| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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/browser. | 5 """Chromium presubmit script for src/extensions/browser. |
| 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 gcl. | 8 for more details on the presubmit API built into gcl. |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 def GetPreferredTrySlaves(): | 11 def GetPreferredTryMasters(project, change): |
| 12 return ['linux_chromeos'] | 12 return { |
| 13 'tryserver.chromium': { |
| 14 'linux_chromeos': set(['defaulttests']), |
| 15 } |
| 16 } |
| 13 | 17 |
| 14 class HistogramValueChecker(object): | 18 class HistogramValueChecker(object): |
| 15 """Verify that changes to "extension_function_histogram_value.h" are valid. | 19 """Verify that changes to "extension_function_histogram_value.h" are valid. |
| 16 | 20 |
| 17 See comments at the top of the "extension_function_histogram_value.h" file | 21 See comments at the top of the "extension_function_histogram_value.h" file |
| 18 for what are considered valid changes. There are situations where this script | 22 for what are considered valid changes. There are situations where this script |
| 19 gives false positive warnings, i.e. it warns even though the edit is | 23 gives false positive warnings, i.e. it warns even though the edit is |
| 20 legitimate. Since the script warns using prompt warnings, the user can always | 24 legitimate. Since the script warns using prompt warnings, the user can always |
| 21 choose to continue. The main point is to attract the attention to all | 25 choose to continue. The main point is to attract the attention to all |
| 22 (potentially or not) invalid edits. | 26 (potentially or not) invalid edits. |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 if file.LocalPath() == self.LOCAL_PATH: | 299 if file.LocalPath() == self.LOCAL_PATH: |
| 296 self.ProcessHistogramValueFile(file) | 300 self.ProcessHistogramValueFile(file) |
| 297 return self.results | 301 return self.results |
| 298 | 302 |
| 299 def CheckChangeOnUpload(input_api, output_api): | 303 def CheckChangeOnUpload(input_api, output_api): |
| 300 results = [] | 304 results = [] |
| 301 results += HistogramValueChecker(input_api, output_api).Run() | 305 results += HistogramValueChecker(input_api, output_api).Run() |
| 302 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api) | 306 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api) |
| 303 return results | 307 return results |
| 304 | 308 |
| OLD | NEW |