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

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

Issue 1863623002: Convert Site Details to settings-subpage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix merge Created 4 years, 8 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_details_permission.js
diff --git a/chrome/browser/resources/settings/site_settings/site_details_permission.js b/chrome/browser/resources/settings/site_settings/site_details_permission.js
index b2f4ce64725c50885d8ce6af5f0a8f42729688b2..05101a8480333f552cd5df7503aca0b61c5679b6 100644
--- a/chrome/browser/resources/settings/site_settings/site_details_permission.js
+++ b/chrome/browser/resources/settings/site_settings/site_details_permission.js
@@ -46,19 +46,22 @@ Polymer({
* @private
*/
siteChanged_: function(site) {
- this.$.details.hidden = true;
+ // Finish this asynchronously to give |category| a chance to be set first.
michaelpg 2016/04/05 18:22:53 May be preferable to keep this synchronous by maki
Finnur 2016/04/06 00:25:19 Doh. Of course. Can't believe I overlooked that. M
+ this.async(function() {
+ this.$.details.hidden = true;
- var prefsProxy = settings.SiteSettingsPrefsBrowserProxyImpl.getInstance();
- prefsProxy.getExceptionList(this.category).then(function(exceptionList) {
- for (var i = 0; i < exceptionList.length; ++i) {
- if (exceptionList[i].origin == site.origin) {
- // TODO(finnur): Convert to use attrForSelected.
- this.$.permission.selected = exceptionList[i].setting ==
- settings.PermissionStringValues.ALLOW ? 0 : 1;
- this.$.details.hidden = false;
+ var prefsProxy = settings.SiteSettingsPrefsBrowserProxyImpl.getInstance();
+ prefsProxy.getExceptionList(this.category).then(function(exceptionList) {
+ for (var i = 0; i < exceptionList.length; ++i) {
+ if (exceptionList[i].origin == site.origin) {
+ // TODO(finnur): Convert to use attrForSelected.
+ this.$.permission.selected = exceptionList[i].setting ==
+ settings.PermissionStringValues.ALLOW ? 0 : 1;
+ this.$.details.hidden = false;
+ }
}
- }
- }.bind(this));
+ }.bind(this));
+ });
},
/**

Powered by Google App Engine
This is Rietveld 408576698