Commit 1ed043b4 authored by Christian Dullweber's avatar Christian Dullweber Committed by Commit Bot

Fix missing dependency for SameSite deletion button

Whether the button is shown depends on sites.length but the dependecy
was not declared, so the button didn't show up.
Also hide the button when there is a filter as the filter can't be
applied to third-party cookie deletion yet.

Bug: 987177
Change-Id: Id36a286ed73da404446c8b98dabbf3751b5658e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1831874
Commit-Queue: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: default avatarDan Beam <dbeam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701961}
parent f8f8df63
......@@ -44,7 +44,7 @@
</cr-button>
<cr-button disabled$="[[isLoading_]]" id="removeThirdPartyCookies"
on-click="onRemoveThirdPartyCookiesTap_"
hidden$="[[!enableRemovingAllThirdPartyCookies_]]">
hidden$="[[!showRemoveThirdPartyCookies_(sites.length, filter)]]">
$i18n{siteSettingsCookieRemoveAllThirdParty}
</cr-button>
</div>
......
......@@ -75,15 +75,6 @@ Polymer({
/** @private */
listBlurred_: Boolean,
/** @private */
enableRemovingAllThirdPartyCookies_: {
type: Boolean,
value: function() {
return loadTimeData.getBoolean('enableRemovingAllThirdPartyCookies') &&
(this.sites.length > 0);
}
},
},
/** @private {settings.LocalDataBrowserProxy} */
......@@ -287,4 +278,13 @@ Polymer({
new URLSearchParams('site=' + event.model.item.site));
this.lastSelected_ = event.model;
},
/**
* @private
* @return {boolean}
*/
showRemoveThirdPartyCookies_: function() {
return loadTimeData.getBoolean('enableRemovingAllThirdPartyCookies') &&
this.sites.length > 0 && this.filter.length == 0;
},
});
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