Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Side by Side Diff: PRESUBMIT.py

Issue 2417513002: Add PRESUBMIT to disallow new usage of FOR_EACH_OBSERVER. (Closed)
Patch Set: arrowdot Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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. 5 """Top-level presubmit script for Chromium.
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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 ), 300 ),
301 ), 301 ),
302 ( 302 (
303 '#pragma comment(lib,', 303 '#pragma comment(lib,',
304 ( 304 (
305 'Specify libraries to link with in build files and not in the source.', 305 'Specify libraries to link with in build files and not in the source.',
306 ), 306 ),
307 True, 307 True,
308 (), 308 (),
309 ), 309 ),
310 (
311 r'FOR_EACH_OBSERVER(',
312 (
313 'Use range-based for loops to iterate through base::ObserverList, e.g.',
314 ' for (auto& observer : observers) { observer.Observe(); }',
315 ),
316 True,
317 (),
318 ),
310 ) 319 )
311 320
312 321
313 _IPC_ENUM_TRAITS_DEPRECATED = ( 322 _IPC_ENUM_TRAITS_DEPRECATED = (
314 'You are using IPC_ENUM_TRAITS() in your code. It has been deprecated.\n' 323 'You are using IPC_ENUM_TRAITS() in your code. It has been deprecated.\n'
315 'See http://www.chromium.org/Home/chromium-security/education/security-tips- for-ipc') 324 'See http://www.chromium.org/Home/chromium-security/education/security-tips- for-ipc')
316 325
317 326
318 _VALID_OS_MACROS = ( 327 _VALID_OS_MACROS = (
319 # Please keep sorted. 328 # Please keep sorted.
(...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after
2264 results.extend(input_api.canned_checks.CheckTreeIsOpen( 2273 results.extend(input_api.canned_checks.CheckTreeIsOpen(
2265 input_api, 2274 input_api,
2266 output_api, 2275 output_api,
2267 json_url='http://chromium-status.appspot.com/current?format=json')) 2276 json_url='http://chromium-status.appspot.com/current?format=json'))
2268 2277
2269 results.extend(input_api.canned_checks.CheckChangeHasBugField( 2278 results.extend(input_api.canned_checks.CheckChangeHasBugField(
2270 input_api, output_api)) 2279 input_api, output_api))
2271 results.extend(input_api.canned_checks.CheckChangeHasDescription( 2280 results.extend(input_api.canned_checks.CheckChangeHasDescription(
2272 input_api, output_api)) 2281 input_api, output_api))
2273 return results 2282 return results
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698