summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/resources/safety_tips/PRESUBMIT.py
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/browser/resources/safety_tips/PRESUBMIT.py')
-rw-r--r--chromium/chrome/browser/resources/safety_tips/PRESUBMIT.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/chromium/chrome/browser/resources/safety_tips/PRESUBMIT.py b/chromium/chrome/browser/resources/safety_tips/PRESUBMIT.py
index 012844a2057..e7eae89d2bf 100644
--- a/chromium/chrome/browser/resources/safety_tips/PRESUBMIT.py
+++ b/chromium/chrome/browser/resources/safety_tips/PRESUBMIT.py
@@ -24,18 +24,13 @@ def CheckVersionUpdatedInProto(input_api, output_api):
return []
contents = safety_tips_proto[0].ChangedContents()
- # Must not have any changes containing flagged_page:
- if ContainsLine(contents, 'flagged_page:'):
+ # Must not have any changes containing flagged_page or allowed_pattern:
+ if (ContainsLine(contents, 'flagged_page:') or
+ ContainsLine(contents, 'allowed_pattern:')):
return [output_api.PresubmitError(
'Do not check in the full safety_tips.asciipb proto. '
'Only increment |version_id|.')]
- # This proto should not contain any actually-flagged pages. ContainsLine
- # checks if any line *starts with* the given string.
- if ContainsLine(contents, 'flagged_page:'):
- return [output_api.PresubmitError(
- 'Remove entries from Chromium safety_tips.asciipb before submitting.')]
-
# It's enticing to do something fancy like checking whether the ID was in fact
# incremented or whether this is a whitespace-only or comment-only change.
# However, currently deleted lines don't show up in ChangedContents() and