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

Unified Diff: third_party/WebKit/Source/core/frame/PRESUBMIT.py

Issue 2841823007: Fix presubmit_scheme_histograms.py and presubmit_bad_message_reasons.py (Closed)
Patch Set: Fix an old typo in _RunHistogramChecks. Created 3 years, 8 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/PRESUBMIT.py ('k') | tools/metrics/histograms/presubmit_bad_message_reasons.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/PRESUBMIT.py
diff --git a/third_party/WebKit/Source/core/frame/PRESUBMIT.py b/third_party/WebKit/Source/core/frame/PRESUBMIT.py
index ec96ed48c28a962f47e9236a9d20c60028f324c5..3d85942c8b78e13f46264fbd90b505885a004023 100644
--- a/third_party/WebKit/Source/core/frame/PRESUBMIT.py
+++ b/third_party/WebKit/Source/core/frame/PRESUBMIT.py
@@ -74,24 +74,16 @@ def _RunUmaHistogramChecks(input_api, output_api):
start_marker = '^enum Feature : uint32_t {'
end_marker = '^kNumberOfFeatures'
- should_update_histogram, duplicated_values = update_histogram_enum.HistogramNeedsUpdate(
+ presubmit_error = update_histogram_enum.CheckPresubmitErrors(
histogram_enum_name='FeatureObserver',
+ update_script_name='update_use_counter_feature_enum.py',
source_enum_path=source_path,
start_marker=start_marker,
end_marker=end_marker,
strip_k_prefix=True)
- if duplicated_values:
- return [output_api.PresubmitPromptWarning(
- 'UseCounter::Feature has been updated and there exists duplicated '
- 'values between (%s) and (%s)' % duplicated_values,
- items=[source_path])]
- if should_update_histogram:
- return [output_api.PresubmitPromptWarning(
- 'UseCounter::Feature has been updated and the UMA mapping needs to '
- 'be regenerated. Please run update_use_counter_feature_enum.py in '
- 'src/tools/metrics/histograms/ to update the mapping.',
- items=[source_path])]
-
+ if presubmit_error:
+ return [output_api.PresubmitPromptWarning(presubmit_error,
+ items=[source_path])]
return []
« no previous file with comments | « extensions/browser/PRESUBMIT.py ('k') | tools/metrics/histograms/presubmit_bad_message_reasons.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698