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

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

Issue 2744583004: MD Settings: For some content types, make per-site exceptions read-only. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_list.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 86bbc03ecf8d90945a71ab204f81c0191aa7eb86..ddfe126cdc39b67ca6031d504ffb471c3b4fa723 100644
--- a/chrome/browser/resources/settings/site_settings/site_list.js
+++ b/chrome/browser/resources/settings/site_settings/site_list.js
@@ -35,6 +35,16 @@ Polymer({
},
/**
+ * Some content types (like Location) do not allow the user to manually
+ * edit the exception list from within Settings.
+ * @private
+ */
+ readOnlyList: {
+ type: Boolean,
+ value: false,
+ },
+
+ /**
* The site serving as the model for the currently open action menu.
* @private {?SiteException}
*/
@@ -206,11 +216,12 @@ Polymer({
/**
* @param {string} source Where the setting came from.
+ * @param {boolean} readOnlyList Whether the site exception list is read-only.
* @return {boolean}
* @private
*/
- isActionMenuHidden_: function(source) {
- return this.isExceptionControlled_(source) || this.allSites;
+ isActionMenuHidden_: function(source, readOnlyList) {
+ return this.isExceptionControlled_(source) || this.allSites || readOnlyList;
},
/**
@@ -219,6 +230,7 @@ Polymer({
* @private
*/
onAddSiteTap_: function(e) {
+ assert(!this.readOnlyList);
e.preventDefault();
var dialog = document.createElement('add-site-dialog');
dialog.category = this.category;
« no previous file with comments | « chrome/browser/resources/settings/site_settings/site_list.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698