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

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: unit test 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
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..48fca0f1950888e7e9d4b65728c84031b8664aa7 100644
--- a/chrome/browser/resources/settings/site_settings/add_site_dialog.js
+++ b/chrome/browser/resources/settings/site_settings/add_site_dialog.js
@@ -14,15 +14,28 @@ Polymer({
properties: {
/**
+ * What kind of setting, e.g. Location, Camera, Cookies, and so on.
+ * @type {settings.ContentSettingsTypes}
+ */
+ category: String,
+
+ /**
+ * Whether this is about an Allow, Block, SessionOnly, or other.
+ * @type {settings.PermissionValues}
+ */
+ contentSetting: String,
+
+ /**
* 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 +46,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 +88,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();
},

Powered by Google App Engine
This is Rietveld 408576698