| 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 GetPreferredTryMasters(project, change): | 11 def GetPreferredTryMasters(project, change): |
| 12 return { | 12 return { |
| 13 'tryserver.chromium': { | 13 'tryserver.chromium': { |
| 14 'linux_chromeos': set(['defaulttests']), | 14 'linux_chromium_chromeos_rel': set(['defaulttests']), |
| 15 } | 15 } |
| 16 } | 16 } |
| 17 | 17 |
| 18 class HistogramValueChecker(object): | 18 class HistogramValueChecker(object): |
| 19 """Verify that changes to "extension_function_histogram_value.h" are valid. | 19 """Verify that changes to "extension_function_histogram_value.h" are valid. |
| 20 | 20 |
| 21 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 |
| 22 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 |
| 23 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 |
| 24 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 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 if file.LocalPath() == self.LOCAL_PATH: | 299 if file.LocalPath() == self.LOCAL_PATH: |
| 300 self.ProcessHistogramValueFile(file) | 300 self.ProcessHistogramValueFile(file) |
| 301 return self.results | 301 return self.results |
| 302 | 302 |
| 303 def CheckChangeOnUpload(input_api, output_api): | 303 def CheckChangeOnUpload(input_api, output_api): |
| 304 results = [] | 304 results = [] |
| 305 results += HistogramValueChecker(input_api, output_api).Run() | 305 results += HistogramValueChecker(input_api, output_api).Run() |
| 306 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api) | 306 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api) |
| 307 return results | 307 return results |
| 308 | 308 |
| OLD | NEW |