Skip to content

Commit

Permalink
Account for changes to WebUI JS code naming to reflect the Profile::I…
Browse files Browse the repository at this point in the history
…sChild API

Fixes brave/brave-browser#21225

Needed to rename isSupervised to isChildAccount to match upstream. Bug
manifested itself as missing settings for "Clear on Exit" and an error in the
JavaScript console.

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/5441f9b71eecac1b8acfafa78dbc7c4148cb2143

commit 5441f9b71eecac1b8acfafa78dbc7c4148cb2143
Author: Nohemi Fernandez <fernandex@chromium.org>
Date:   Tue Dec 14 13:11:35 2021 +0000

    Update WebUI JS code naming to reflect the Profile::IsChild API.

    Follow-up to crrev.com/c/3314914.

    Bug: 1277015
  • Loading branch information
emerick authored and mkarolin committed Feb 22, 2022
1 parent 1d6c579 commit 08fdfe4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Polymer({
*/
showUseSystem_(themeId, useSystemTheme) {
return (!!themeId || !useSystemTheme) &&
!this.appearanceBrowserProxy_.isSupervised();
!this.appearanceBrowserProxy_.isChildAccount();
},

/**
Expand Down Expand Up @@ -211,7 +211,7 @@ Polymer({
*/
showUseSystem_(themeId, useSystemTheme) {
return (!!themeId || !useSystemTheme) &&
!this.appearanceBrowserProxy_.isSupervised();
!this.appearanceBrowserProxy_.isChildAccount();
},

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
pref="{{prefs.browser.clear_data.browsing_history_on_exit}}"
label="$i18n{clearBrowsingHistory}"
sub-label="[[counters.browsing_history]]"
hidden="[[isSupervised_]]"
hidden="[[isChildAccount_]]"
no-set-pref>
</settings-checkbox>
<settings-checkbox id="downloadCheckboxOnExit"
pref="{{prefs.browser.clear_data.download_history_on_exit}}"
label="$i18n{clearDownloadHistory}"
sub-label="[[counters.download_history]]"
hidden="[[isSupervised_]]"
hidden="[[isChildAccount_]]"
no-set-pref>
</settings-checkbox>
<settings-checkbox id="cookiesCheckboxOnExit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ Polymer({
value: false,
},

isSupervised_: {
isChildAccount_: {
type: Boolean,
value: function() {
return loadTimeData.getBoolean('isSupervised');
return loadTimeData.getBoolean('isChildAccount');
},
},

Expand Down

0 comments on commit 08fdfe4

Please sign in to comment.