summaryrefslogtreecommitdiff
path: root/chromium/content/browser/PRESUBMIT.py
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/browser/PRESUBMIT.py')
-rw-r--r--chromium/content/browser/PRESUBMIT.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/chromium/content/browser/PRESUBMIT.py b/chromium/content/browser/PRESUBMIT.py
index 67e1c2a7c0f..192cc15b36c 100644
--- a/chromium/content/browser/PRESUBMIT.py
+++ b/chromium/content/browser/PRESUBMIT.py
@@ -6,9 +6,15 @@
match the corresponding bad_message.h file.
"""
+def CheckChangeOnCommit(input_api, output_api):
+ return _CommonChecks(input_api, output_api)
+
+def CheckChangeOnUpload(input_api, output_api):
+ return _CommonChecks(input_api, output_api)
+
def _RunHistogramChecks(input_api, output_api, histogram_name):
try:
- # Setup sys.path so that we can call histrogram code
+ # Setup sys.path so that we can call histograms code.
import sys
original_sys_path = sys.path
sys.path = sys.path + [input_api.os_path.join(
@@ -24,5 +30,5 @@ def _RunHistogramChecks(input_api, output_api, histogram_name):
finally:
sys.path = original_sys_path
-def CheckChangeOnUpload(input_api, output_api):
+def _CommonChecks(input_api, output_api):
return _RunHistogramChecks(input_api, output_api, "BadMessageReasonContent")