Chromium Code Reviews| 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 b053707fcf76a370e5bbe0a7f6c442b2f1391a67..eb44a37ca54fc37c11048a66215eafaa8ed2bff2 100644 |
| --- a/chrome/browser/resources/settings/site_settings/site_list.js |
| +++ b/chrome/browser/resources/settings/site_settings/site_list.js |
| @@ -2,12 +2,6 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -// Define a global boolean for notifications (only enabled in the test class). |
| -cr.exportPath('settings_test'); |
| - |
| -/** @type {boolean} */ |
| -settings_test.siteListNotifyForTest; |
| - |
| /** |
| * @fileoverview |
| * 'settings-site-list' shows a list of Allowed and Blocked sites for a given |
| @@ -43,7 +37,6 @@ Polymer({ |
| sites: { |
| type: Array, |
| value: function() { return []; }, |
| - notify: true, // !!settings_test.siteListNotifyForTest, |
| }, |
| /** |
| @@ -155,14 +148,18 @@ Polymer({ |
| // Block list should only be shown opened if there is nothing to show in |
| // the allowed list. |
| - var prefsProxy = settings.SiteSettingsPrefsBrowserProxyImpl.getInstance(); |
| - prefsProxy.getExceptionList(this.category).then(function(exceptionList) { |
| - for (var i = 0; i < exceptionList.length; ++i) { |
| - if (exceptionList[i].setting == 'allow') |
| - return; |
| - } |
| + if (this.category != settings.INVALID_CATEGORY_SUBTYPE) { |
| + var prefsProxy = settings.SiteSettingsPrefsBrowserProxyImpl.getInstance(); |
|
dpapad
2016/03/29 21:46:33
Nit(optional): You can simply name this browserPro
Finnur
2016/03/30 11:22:43
Done.
|
| + prefsProxy.getExceptionList(this.category).then(function(exceptionList) { |
| + for (var i = 0; i < exceptionList.length; ++i) { |
|
dpapad
2016/03/29 21:46:33
Nit: You can use the Array#some() method instead,
Finnur
2016/03/30 11:22:43
Done.
|
| + if (exceptionList[i].setting == 'allow') |
|
dpapad
2016/03/29 21:46:33
Isn't there an enum or constant for the literal 'a
Finnur
2016/03/30 11:22:43
Done.
|
| + return; |
| + } |
| + this.$.category.opened = true; |
| + }.bind(this)); |
| + } else { |
| this.$.category.opened = true; |
| - }.bind(this)); |
| + } |
| }, |
| /** |