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 depot_tools. | 8 for more details about the presubmit API built into depot_tools. |
9 """ | 9 """ |
10 | 10 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 line_number += match.group().count('\n') | 137 line_number += match.group().count('\n') |
138 match = uma_macro_re.search(contents) | 138 match = uma_macro_re.search(contents) |
139 | 139 |
140 if problems: | 140 if problems: |
141 return [output_api.PresubmitError( | 141 return [output_api.PresubmitError( |
142 'UMA_HISTOGRAM_ENUMERATION reports in src/media/ are expected to adhere\n' | 142 'UMA_HISTOGRAM_ENUMERATION reports in src/media/ are expected to adhere\n' |
143 'to the following guidelines:\n' | 143 'to the following guidelines:\n' |
144 ' - The max value (3rd argument) should be an enum value equal to the\n' | 144 ' - The max value (3rd argument) should be an enum value equal to the\n' |
145 ' last valid value, e.g. FOO_MAX = LAST_VALID_FOO.\n' | 145 ' last valid value, e.g. FOO_MAX = LAST_VALID_FOO.\n' |
146 ' - 1 must be added to that max value.\n' | 146 ' - 1 must be added to that max value.\n' |
147 'Contact rileya@chromium.org if you have questions.' , problems)] | 147 'Contact dalecurtis@chromium.org if you have questions.' , problems)] |
148 | 148 |
149 return [] | 149 return [] |
150 | 150 |
151 | 151 |
152 def _CheckPassByValue(input_api, output_api): | 152 def _CheckPassByValue(input_api, output_api): |
153 """Check that base::Time and derived classes are passed by value, and not by | 153 """Check that base::Time and derived classes are passed by value, and not by |
154 const reference """ | 154 const reference """ |
155 | 155 |
156 problems = [] | 156 problems = [] |
157 | 157 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 results.extend(_CheckForUseOfLazyInstance(input_api, output_api)) | 193 results.extend(_CheckForUseOfLazyInstance(input_api, output_api)) |
194 return results | 194 return results |
195 | 195 |
196 | 196 |
197 def CheckChangeOnUpload(input_api, output_api): | 197 def CheckChangeOnUpload(input_api, output_api): |
198 return _CheckChange(input_api, output_api) | 198 return _CheckChange(input_api, output_api) |
199 | 199 |
200 | 200 |
201 def CheckChangeOnCommit(input_api, output_api): | 201 def CheckChangeOnCommit(input_api, output_api): |
202 return _CheckChange(input_api, output_api) | 202 return _CheckChange(input_api, output_api) |
OLD | NEW |