tools/variations/cleanup_stale_fieldtrial_configs.py
def is_study_used(study_name, configs):
  """Checks if a given study is used in the codebase."""
  if study_name.startswith('WebRTC-'):
    return True  # Skip webrtc studies which give false positives.

  if is_literal_used(study_name):
    return True
  for config in configs:
    for experiment in config.get('experiments', []):
      for feature in experiment.get('enable_features', []):
        if is_literal_used(feature):
          return True
      for feature in experiment.get('disable_features', []):
        if is_literal_used(feature):
          return True
  return False
Checks if a given study is used in the codebase.
Checks if a given study is used in the codebase.
Checks if a given study is used in the codebase .
def is_study_used(study_name, configs):
  if study_name.startswith('WebRTC-'):
    return True  
  if is_literal_used(study_name):
    return True
  for config in configs:
    for experiment in config.get('experiments', []):
      for feature in experiment.get('enable_features', []):
        if is_literal_used(feature):
          return True
      for feature in experiment.get('disable_features', []):
        if is_literal_used(feature):
          return True
  return False
def is_study_used ( study_name , configs ) : if study_name . startswith ( 'WebRTC-' ) : return True if is_literal_used ( study_name ) : return True for config in configs : for experiment in config . get ( 'experiments' , [ ] ) : for feature in experiment . get ( 'enable_features' , [ ] ) : if is_literal_used ( feature ) : return True for feature in experiment . get ( 'disable_features' , [ ] ) : if is_literal_used ( feature ) : return True return False
Checks if a given study is used in the codebase.
Checks if a given study is used in the codebase .
"""Checks if a given study is used in the codebase.""" # Skip webrtc studies which give false positives.
study_name
configs