Commit 398c37dd authored by yiyaoliu's avatar yiyaoliu Committed by Commit bot

Remove obsolete fieldtrial related code.

BUG=308692

Review URL: https://codereview.chromium.org/513803005

Cr-Commit-Position: refs/heads/master@{#292517}
parent 66e0255c
...@@ -42,9 +42,9 @@ XML below will generate the following five histograms: ...@@ -42,9 +42,9 @@ XML below will generate the following five histograms:
<histogram_suffixes_list> <histogram_suffixes_list>
<histogram_suffixes name="BrowserType"> <histogram_suffixes name="BrowserType">
<group name="Chrome"/> <suffix name="Chrome"/>
<group name="IE"/> <suffix name="IE"/>
<group name="Firefox"/> <suffix name="Firefox"/>
<affected-histogram name="HistogramEnum"/> <affected-histogram name="HistogramEnum"/>
</histogram_suffixes> </histogram_suffixes>
...@@ -307,15 +307,9 @@ def _UpdateHistogramsWithSuffixes(tree, histograms): ...@@ -307,15 +307,9 @@ def _UpdateHistogramsWithSuffixes(tree, histograms):
""" """
have_errors = False have_errors = False
# TODO(yiyaoliu): Remove this part after fieldtrial is not used any more. histogram_suffix_tag = 'histogram_suffixes'
if tree.getElementsByTagName('histogram_suffixes'): suffix_tag = 'suffix'
histogram_suffix_tag = 'histogram_suffixes' with_tag = 'with-suffix'
suffix_tag = 'suffix'
with_tag = 'with-suffix'
else:
histogram_suffix_tag = 'fieldtrial'
suffix_tag = 'group'
with_tag = 'with-group'
# Verify order of histogram_suffixes fields first. # Verify order of histogram_suffixes fields first.
last_name = None last_name = None
......
...@@ -40,10 +40,6 @@ ALPHABETIZATION_RULES = { ...@@ -40,10 +40,6 @@ ALPHABETIZATION_RULES = {
'histogram_suffixes', lambda n: n.attributes['name'].value.lower()), 'histogram_suffixes', lambda n: n.attributes['name'].value.lower()),
'histogram_suffixes': ('affected-histogram', 'histogram_suffixes': ('affected-histogram',
lambda n: n.attributes['name'].value.lower()), lambda n: n.attributes['name'].value.lower()),
# TODO(yiyaoliu): Remove fieldtrial related pieces when it is not used.
'fieldtrials': ('fieldtrial', lambda n: n.attributes['name'].value.lower()),
'fieldtrial': ('affected-histogram',
lambda n: n.attributes['name'].value.lower()),
} }
......
...@@ -20,11 +20,7 @@ ATTRIBUTE_ORDER = { ...@@ -20,11 +20,7 @@ ATTRIBUTE_ORDER = {
'int': ['value', 'label'], 'int': ['value', 'label'],
'histogram_suffixes': ['name', 'separator', 'ordering'], 'histogram_suffixes': ['name', 'separator', 'ordering'],
'suffix': ['name', 'label'], 'suffix': ['name', 'label'],
# TODO(yiyaoliu): Remove fieldtrial related pieces when it is not used.
'fieldtrial': ['name', 'separator', 'ordering'],
'group': ['name', 'label'],
'affected-histogram': ['name'], 'affected-histogram': ['name'],
'with-group': ['name'],
'with-suffix': ['name'], 'with-suffix': ['name'],
} }
...@@ -33,8 +29,6 @@ TAGS_THAT_DONT_INDENT = [ ...@@ -33,8 +29,6 @@ TAGS_THAT_DONT_INDENT = [
'histogram-configuration', 'histogram-configuration',
'histograms', 'histograms',
'histogram_suffixes_list', 'histogram_suffixes_list',
# TODO(yiyaoliu): Remove fieldtrial related pieces when it is not used.
'fieldtrials',
'enums' 'enums'
] ]
...@@ -43,14 +37,11 @@ TAGS_THAT_DONT_INDENT = [ ...@@ -43,14 +37,11 @@ TAGS_THAT_DONT_INDENT = [
TAGS_THAT_HAVE_EXTRA_NEWLINE = { TAGS_THAT_HAVE_EXTRA_NEWLINE = {
'histogram-configuration': (2, 1, 1), 'histogram-configuration': (2, 1, 1),
'histograms': (2, 1, 1), 'histograms': (2, 1, 1),
# TODO(yiyaoliu): Remove fieldtrial related pieces when it is not used. 'histogram': (1, 1, 1),
'fieldtrials': (2, 1, 1),
'histogram_suffixes_list': (2, 1, 1), 'histogram_suffixes_list': (2, 1, 1),
'histogram_suffixes': (1, 1, 1), 'histogram_suffixes': (1, 1, 1),
'enums': (2, 1, 1), 'enums': (2, 1, 1),
'histogram': (1, 1, 1),
'enum': (1, 1, 1), 'enum': (1, 1, 1),
'fieldtrial': (1, 1, 1),
} }
# Tags that we allow to be squished into a single line for brevity. # Tags that we allow to be squished into a single line for brevity.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment