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

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

Issue 2468363005: [MD settings] show blocked sites even when category is blocked (Closed)
Patch Set: review changes Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/resources/settings/site_settings/compiled_resources2.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/site_settings/add_site_dialog.js
diff --git a/chrome/browser/resources/settings/site_settings/add_site_dialog.js b/chrome/browser/resources/settings/site_settings/add_site_dialog.js
index 6c09138011aecb0055a15394f7f2fafd4e795087..f186be3c13f1b01d43b473b94ad421d6d0d21a2e 100644
--- a/chrome/browser/resources/settings/site_settings/add_site_dialog.js
+++ b/chrome/browser/resources/settings/site_settings/add_site_dialog.js
@@ -13,16 +13,23 @@ Polymer({
behaviors: [SiteSettingsBehavior, WebUIListenerBehavior],
properties: {
+ /* What kind of setting, e.g. Location, Camera, Cookies, and so on. */
+ category: String,
+
+ /* Whether this is about an Allow, Block, SessionOnly, or other. */
+ contentSetting: String,
dpapad 2016/11/08 00:12:32 As discussed, could this be typed as an enum inste
dschuyler 2016/11/08 00:40:50 Done.
+
/**
* The site to add an exception for.
* @private
*/
site_: String,
+ },
- /**
- * Whether this is an allow exception this dialog is adding.
- */
- allowException: Boolean,
+ /** @override */
+ attached: function() {
+ assert(this.category);
+ assert(this.contentSetting);
},
/**
@@ -33,7 +40,6 @@ Polymer({
open: function(type) {
this.addWebUIListener('onIncognitoStatusChanged',
this.onIncognitoStatusChanged_.bind(this));
- this.allowException = type == settings.PermissionValues.ALLOW;
this.browserProxy.updateIncognitoStatus();
this.$.dialog.showModal();
},
@@ -76,8 +82,7 @@ Polymer({
return; // Can happen when Enter is pressed.
var pattern = this.addPatternWildcard(this.site_);
this.browserProxy.setCategoryPermissionForOrigin(
- pattern, pattern, this.category, this.allowException ?
- settings.PermissionValues.ALLOW : settings.PermissionValues.BLOCK,
+ pattern, pattern, this.category, this.contentSetting,
this.$.incognito.checked);
this.$.dialog.close();
},
« no previous file with comments | « no previous file | chrome/browser/resources/settings/site_settings/compiled_resources2.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698