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

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

Issue 2894063002: Expose UseCounter::Feature enum out of blink as WebFeature (Closed)
Patch Set: Rebase update Created 3 years, 7 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
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 3d85942c8b78e13f46264fbd90b505885a004023..a702108f059f6e5b1b11b15273c47944e2da0895 100644
--- a/third_party/WebKit/Source/core/frame/PRESUBMIT.py
+++ b/third_party/WebKit/Source/core/frame/PRESUBMIT.py
@@ -52,50 +52,13 @@ def _RunUseCounterChecks(input_api, output_api):
return []
-def _RunUmaHistogramChecks(input_api, output_api):
- import sys
-
- original_sys_path = sys.path
- try:
- sys.path = sys.path + [input_api.os_path.join(
- input_api.PresubmitLocalPath(), '..', '..', '..', '..', '..',
- 'tools', 'metrics', 'histograms')]
- import update_histogram_enum
- finally:
- sys.path = original_sys_path
-
- source_path = ''
- for f in input_api.AffectedFiles():
- if f.LocalPath().endswith('UseCounter.h'):
- source_path = f.LocalPath()
- break
- else:
- return []
-
- start_marker = '^enum Feature : uint32_t {'
- end_marker = '^kNumberOfFeatures'
- 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 presubmit_error:
- return [output_api.PresubmitPromptWarning(presubmit_error,
- items=[source_path])]
- return []
-
-
def CheckChangeOnUpload(input_api, output_api):
results = []
results.extend(_RunUseCounterChecks(input_api, output_api))
- results.extend(_RunUmaHistogramChecks(input_api, output_api))
return results
def CheckChangeOnCommit(input_api, output_api):
results = []
results.extend(_RunUseCounterChecks(input_api, output_api))
- results.extend(_RunUmaHistogramChecks(input_api, output_api))
return results
« no previous file with comments | « third_party/WebKit/Source/core/frame/Deprecation.h ('k') | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698