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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 3083e5455a90c559456b1d4a5eb31dd3eeb6381e..5786edb16b88842e115e5f88d60a9b4b4217a6ff 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -307,6 +307,15 @@ _BANNED_CPP_FUNCTIONS = (
True,
(),
),
+ (
+ r'FOR_EACH_OBSERVER(',
+ (
+ 'Use range-based for loops to iterate through base::ObserverList, e.g.',
+ ' for (auto& observer : observers) { observer.Observe(); }',
+ ),
+ True,
+ (),
+ ),
)
« 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