Skip to content

Commit

Permalink
Replace indicator icon to kite for users under parental supervision.
Browse files Browse the repository at this point in the history
Bug: 944118
Change-Id: I6ac8ce83c6037a6c6db3b15a111414c68707c8aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1548567
Commit-Queue: Yilkal Abe <yilkal@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#650543}
  • Loading branch information
yilkal authored and Commit Bot committed Apr 13, 2019
1 parent 133cc81 commit adde9d0
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 3 deletions.
4 changes: 3 additions & 1 deletion chrome/app/chromeos_strings.grdp
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,9 @@
<message name="IDS_CONTROLLED_SETTING_DEMO_SESSION" desc="Text displayed in the controlled settings bubble when a setting's value is enforced by demo session.">
This setting can't be changed in a demo session.
</message>

<message name="IDS_CONTROLLED_SETTING_WITH_PARENT" desc="Text displayed in the controlled settings bubble when a setting's value is controlled by user's parent.">
This setting is managed by a parent.
</message>
<message name="IDS_STATUSBAR_DISABLE_SPOKEN_FEEDBACK" desc="The menu option to disable spoken feedback accessibility feature.">
Disable ChromeVox (spoken feedback)
</message>
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/resources/settings/settings_ui/settings_ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ Polymer({
loadTimeData.getString('controlledSettingWithOwner'),
controlledSettingNoOwner:
loadTimeData.getString('controlledSettingNoOwner'),
controlledSettingWithParent:
loadTimeData.getString('controlledSettingWithParent'),
// </if>
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source) {
{"controlledSettingShared", IDS_CONTROLLED_SETTING_SHARED},
{"controlledSettingWithOwner", IDS_CONTROLLED_SETTING_WITH_OWNER},
{"controlledSettingNoOwner", IDS_CONTROLLED_SETTING_NO_OWNER},
{"controlledSettingWithParent", IDS_CONTROLLED_SETTING_WITH_PARENT},
#endif
};
AddLocalizedStringsBulk(html_source, localized_strings,
Expand Down
3 changes: 2 additions & 1 deletion chrome/common/extensions/api/settings_private.idl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ namespace settingsPrivate {
USER_POLICY,
OWNER,
PRIMARY_USER,
EXTENSION
EXTENSION,
PARENT
};

enum Enforcement { ENFORCED, RECOMMENDED };
Expand Down
3 changes: 2 additions & 1 deletion third_party/closure_compiler/externs/settings_private.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018 The Chromium Authors. All rights reserved.
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

Expand Down Expand Up @@ -37,6 +37,7 @@ chrome.settingsPrivate.ControlledBy = {
OWNER: 'OWNER',
PRIMARY_USER: 'PRIMARY_USER',
EXTENSION: 'EXTENSION',
PARENT: 'PARENT',
};

/**
Expand Down
1 change: 1 addition & 0 deletions ui/webui/resources/cr_elements/icons.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
Keep these in sorted order by id="". See also http://goo.gl/Y1OdAq
-->
<g id="domain"><path d="M2,3 L2,17 L11.8267655,17 L13.7904799,17 L18,17 L18,7 L12,7 L12,3 L2,3 Z M8,13 L10,13 L10,15 L8,15 L8,13 Z M4,13 L6,13 L6,15 L4,15 L4,13 Z M8,9 L10,9 L10,11 L8,11 L8,9 Z M4,9 L6,9 L6,11 L4,11 L4,9 Z M12,9 L16,9 L16,15 L12,15 L12,9 Z M12,11 L14,11 L14,13 L12,13 L12,11 Z M8,5 L10,5 L10,7 L8,7 L8,5 Z M4,5 L6,5 L6,7 L4,7 L4,5 Z"></path></g>
<g id="kite"><path d="M 10.32 2 L 4.63 8 l 4.92 7.5 l -0.4 0.6 c -0.04 0.07 -0.09 0.12 -0.14 0.18 c -0.24 0.25 -0.56 0.39 -0.9 0.39 c -0.34 0 -0.65 -0.13 -0.9 -0.39 a 1.35 1.35 0 0 1 -0.37 -0.94 a 2.72 2.72 0 0 0 -0.74 -1.88 a 2.44 2.44 0 0 0 -1.78 -0.78 H 4 v 1.38 h 0.33 c 0.34 0 0.65 0.14 0.9 0.39 c 0.24 0.26 0.37 0.59 0.37 0.95 c 0 0.71 0.26 1.38 0.74 1.88 c 0.48 0.5 1.11 0.78 1.78 0.78 c 0.67 0 1.31 -0.28 1.78 -0.78 c 0.11 -0.11 0.2 -0.23 0.28 -0.35 l 1.27 -1.94 L 16 8 L 10.32 2 z"></path></g>
</svg>
</iron-iconset-svg>
<iron-iconset-svg name="cr" size="24">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* controlledSettingShared: (string|undefined),
* controlledSettingWithOwner: string,
* controlledSettingNoOwner: string,
* controlledSettingWithParent: string,
* }}
*/
// eslint-disable-next-line no-var
Expand All @@ -34,6 +35,7 @@ const CrPolicyIndicatorType = {
PRIMARY_USER: 'primary_user',
RECOMMENDED: 'recommended',
USER_POLICY: 'userPolicy',
PARENT: 'parent',
};

/** @polymerBehavior */
Expand Down Expand Up @@ -100,6 +102,8 @@ const CrPolicyIndicatorBehavior = {
case CrPolicyIndicatorType.DEVICE_POLICY:
case CrPolicyIndicatorType.RECOMMENDED:
return 'cr20:domain';
case CrPolicyIndicatorType.PARENT:
return 'cr20:kite';
default:
assertNotReached();
}
Expand Down Expand Up @@ -135,6 +139,8 @@ const CrPolicyIndicatorBehavior = {
return opt_matches ?
CrPolicyStrings.controlledSettingRecommendedMatches :
CrPolicyStrings.controlledSettingRecommendedDiffers;
case CrPolicyIndicatorType.PARENT:
return CrPolicyStrings.controlledSettingWithParent;
}
return '';
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ Polymer({
return CrPolicyIndicatorType.USER_POLICY;
case chrome.settingsPrivate.ControlledBy.DEVICE_POLICY:
return CrPolicyIndicatorType.DEVICE_POLICY;
case chrome.settingsPrivate.ControlledBy.PARENT:
return CrPolicyIndicatorType.PARENT;
}
}
return CrPolicyIndicatorType.NONE;
Expand Down

0 comments on commit adde9d0

Please sign in to comment.