New issue
Advanced search Search tips

Issue 808953 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

chrome://policy: Display enum name for int-enum policies

Project Member Reported by ljusten@chromium.org, Feb 5 2018

Issue description

Right now, we only display int values for int-enum type policies (see policy_templates.json). Add the enum name as well.

Example/repro:

Create a file
etc/opt/chrome/policies/managed/TEST.json
with contents:
{
  "AdsSettingForIntrusiveAdsSites": 2
}

Open chrome://policy

Note how AdsSettingForIntrusiveAdsSites displays with value '2'.
It would be nice if it said '2 (BlockAds)', where 'BlockAds' is the enum name for value 2. It's fine if the string is not localized.

Alternatively, one could use the caption 'Do not allow ads on sites with intrusive ads', but that would probably have to be localized.

See policy_templates.json for AdsSettingForIntrusiveAdsSites:

'name': 'AdsSettingForIntrusiveAdsSites',
'type': 'int-enum',
'schema': {
  'type': 'integer',
  'enum': [ 1, 2 ],
},
'items': [
  {
    'name': 'AllowAds',
    'value': 1,
    'caption': '''Allow ads on all sites''',
  },
  {
    'name': 'BlockAds',
    'value': 2,
    'caption': '''Do not allow ads on sites with intrusive ads''',
  },
],

 
Description: Show this description
Labels: -Type-Bug Type-Feature
Owner: olsen@google.com

Comment 3 by olsen@google.com, Apr 6 2018

Owner: olsen@chromium.org
Labels: -Pri-3 Pri-2

Sign in to add a comment