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

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

Issue 1428313002: Add a page for showing the details for a given origin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback Created 5 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/site_settings_category.js
diff --git a/chrome/browser/resources/settings/site_settings/site_settings_category.js b/chrome/browser/resources/settings/site_settings/site_settings_category.js
index 3e6a8928e939f8b5562a8c79e6a09e8355180427..3b58fde925f1d2325308964e983a7971c7bfd842 100644
--- a/chrome/browser/resources/settings/site_settings/site_settings_category.js
+++ b/chrome/browser/resources/settings/site_settings/site_settings_category.js
@@ -45,6 +45,14 @@ Polymer({
category: {
type: Number,
},
+
+ /**
+ * The origin that was selected by the user in the dropdown list.
+ */
+ selectedOrigin: {
+ type: String,
+ observer: 'onSelectedOriginChanged_',
+ },
},
observers: [
@@ -52,8 +60,8 @@ Polymer({
],
ready: function() {
- this.$.blockList.categorySubtype = settings.DefaultValues.BLOCK;
- this.$.allowList.categorySubtype = settings.DefaultValues.ALLOW;
+ this.$.blockList.categorySubtype = settings.PermissionValues.BLOCK;
+ this.$.allowList.categorySubtype = settings.PermissionValues.ALLOW;
CrSettingsPrefs.initialized.then(function() {
this.categoryEnabled = this.isCategoryAllowed(this.category);
@@ -74,8 +82,8 @@ Polymer({
// "Allowed" vs "Blocked".
this.setPrefValue(this.computeCategoryPrefName(this.category),
this.categoryEnabled ?
- settings.DefaultValues.ALLOW :
- settings.DefaultValues.BLOCK);
+ settings.PermissionValues.ALLOW :
+ settings.PermissionValues.BLOCK);
break;
case settings.ContentSettingsTypes.NOTIFICATION:
case settings.ContentSettingsTypes.GEOLOCATION:
@@ -84,21 +92,25 @@ Polymer({
// "Ask" vs "Blocked".
this.setPrefValue(this.computeCategoryPrefName(this.category),
this.categoryEnabled ?
- settings.DefaultValues.ASK :
- settings.DefaultValues.BLOCK);
+ settings.PermissionValues.ASK :
+ settings.PermissionValues.BLOCK);
break;
case settings.ContentSettingsTypes.FULLSCREEN:
// "Allowed" vs. "Ask first".
this.setPrefValue(this.computeCategoryPrefName(this.category),
this.categoryEnabled ?
- settings.DefaultValues.ALLOW :
- settings.DefaultValues.ASK);
+ settings.PermissionValues.ALLOW :
+ settings.PermissionValues.ASK);
break;
default:
assertNotReached();
}
},
+ onSelectedOriginChanged_: function() {
+ this.$.pages.setSubpageChain(['site-details']);
+ },
+
/**
* Handles when the global toggle changes.
* @private

Powered by Google App Engine
This is Rietveld 408576698