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

Unified Diff: extensions/browser/PRESUBMIT.py

Issue 1201063002: Set up the infrastructure for Extension event metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaaaaase Created 5 years, 6 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 | « extensions/browser/OWNERS ('k') | extensions/browser/api/alarms/alarm_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/PRESUBMIT.py
diff --git a/extensions/browser/PRESUBMIT.py b/extensions/browser/PRESUBMIT.py
index 4e7acef51d28781f48cb2426bc7003346b1df964..1771979d70c3889e7095f83ca8e3e817c87cc079 100644
--- a/extensions/browser/PRESUBMIT.py
+++ b/extensions/browser/PRESUBMIT.py
@@ -10,7 +10,7 @@ for more details on the presubmit API built into depot_tools.
import sys
-def _CreateHistogramValueChecker(input_api, output_api):
+def _CreateHistogramValueChecker(input_api, output_api, path):
original_sys_path = sys.path
try:
@@ -23,13 +23,24 @@ def _CreateHistogramValueChecker(input_api, output_api):
return StrictEnumValueChecker(input_api, output_api,
start_marker='enum HistogramValue {', end_marker=' // Last entry:',
- path='extensions/browser/extension_function_histogram_value.h')
+ path=path)
+
+
+def _RunHistogramValueCheckers(input_api, output_api):
+ results = []
+ histogram_paths = ('extensions/browser/extension_event_histogram_value.h',
+ 'extensions/browser/extension_function_histogram_value.h')
+ for path in histogram_paths:
+ results += _CreateHistogramValueChecker(input_api, output_api, path).Run()
+ return results
+
def CheckChangeOnUpload(input_api, output_api):
results = []
- results += _CreateHistogramValueChecker(input_api, output_api).Run()
+ # results += _RunHistogramValueCheckers(input_api, output_api)
results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api)
return results
+
def CheckChangeOnCommit(input_api, output_api):
- return _CreateHistogramValueChecker(input_api, output_api).Run()
+ return [] # _RunHistogramValueCheckers(input_api, output_api)
« no previous file with comments | « extensions/browser/OWNERS ('k') | extensions/browser/api/alarms/alarm_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698