| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 """Top-level presubmit script for Chromium media component. | 5 """Top-level presubmit script for Chromium media component. |
| 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 about the presubmit API built into gcl. | 8 for more details about the presubmit API built into depot_tools. |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 def _FilterFile(affected_file): | 11 def _FilterFile(affected_file): |
| 12 """Return true if the file could contain code requiring a presubmit check.""" | 12 """Return true if the file could contain code requiring a presubmit check.""" |
| 13 return affected_file.LocalPath().endswith( | 13 return affected_file.LocalPath().endswith( |
| 14 ('.h', '.cc', '.cpp', '.cxx', '.mm')) | 14 ('.h', '.cc', '.cpp', '.cxx', '.mm')) |
| 15 | 15 |
| 16 | 16 |
| 17 def _CheckForUseOfWrongClock(input_api, output_api): | 17 def _CheckForUseOfWrongClock(input_api, output_api): |
| 18 """Make sure new lines of media code don't use a clock susceptible to skew.""" | 18 """Make sure new lines of media code don't use a clock susceptible to skew.""" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 results.extend(_CheckForHistogramOffByOne(input_api, output_api)) | 166 results.extend(_CheckForHistogramOffByOne(input_api, output_api)) |
| 167 return results | 167 return results |
| 168 | 168 |
| 169 | 169 |
| 170 def CheckChangeOnUpload(input_api, output_api): | 170 def CheckChangeOnUpload(input_api, output_api): |
| 171 return _CheckChange(input_api, output_api) | 171 return _CheckChange(input_api, output_api) |
| 172 | 172 |
| 173 | 173 |
| 174 def CheckChangeOnCommit(input_api, output_api): | 174 def CheckChangeOnCommit(input_api, output_api): |
| 175 return _CheckChange(input_api, output_api) | 175 return _CheckChange(input_api, output_api) |
| OLD | NEW |