Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2393)

Unified Diff: chrome/browser/resources/settings/site_settings/site_list.js

Issue 2429973003: [MD settings] content settings add site button; layout fixes (Closed)
Patch Set: cleanup; unit tests Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/site_settings/site_list.js
diff --git a/chrome/browser/resources/settings/site_settings/site_list.js b/chrome/browser/resources/settings/site_settings/site_list.js
index 8c6af1e2537ff4689c56ab25659ea7f52c5e2f25..d7d0a698b2b94fda473a048a74b6e3c61499ebd5 100644
--- a/chrome/browser/resources/settings/site_settings/site_list.js
+++ b/chrome/browser/resources/settings/site_settings/site_list.js
@@ -169,43 +169,10 @@ Polymer({
}
this.setUpActionMenu_();
- this.ensureOpened_();
this.populateList_();
},
/**
- * Ensures the widget is |opened| when needed when displayed initially.
- * @private
- */
- ensureOpened_: function() {
- // Allowed list and Clear on Exit lists are always shown opened by default
- // and All Sites is presented all in one list (nothing closed by default).
- if (this.allSites ||
dpapad 2016/10/19 19:40:13 Are we removing the all sites view in this CL?
dschuyler 2016/10/20 00:06:09 We put all sites behind a flag in an earlier CL. I
- this.categorySubtype == settings.PermissionValues.ALLOW ||
- this.categorySubtype == settings.PermissionValues.SESSION_ONLY) {
- this.$.category.opened = true;
- return;
- }
-
- // Block list should only be shown opened if there is nothing to show in
- // the other lists.
- if (this.category != settings.INVALID_CATEGORY_SUBTYPE) {
- this.browserProxy_.getExceptionList(this.category).then(
- function(exceptionList) {
- var othersExists = exceptionList.some(function(exception) {
- return exception.setting == settings.PermissionValues.ALLOW ||
- exception.setting == settings.PermissionValues.SESSION_ONLY;
- });
- if (othersExists)
- return;
- this.$.category.opened = true;
- }.bind(this));
- } else {
- this.$.category.opened = true;
- }
- },
-
- /**
* Returns which icon, if any, should represent the fact that this exception
* is controlled.
* @param {!SiteException} item The item from the list we're computing the
@@ -253,17 +220,6 @@ Polymer({
},
/**
- * Handles the expanding and collapsing of the sites list.
- * @private
- */
- onToggle_: function(e) {
- if (this.$.category.opened)
- this.$.icon.icon = 'cr:expand-less';
- else
- this.$.icon.icon = 'cr:expand-more';
- },
-
- /**
* Populate the sites list for display.
* @private
*/

Powered by Google App Engine
This is Rietveld 408576698