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

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

Issue 2795873002: [MD settings] hide for-current-incognito checkbox when incognito inactive (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
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 537f5cb16c0b6b8da9fbf033cee70b910d1fe423..1e02855c308c073244b3ab1c8fd7911eac45d034 100644
--- a/chrome/browser/resources/settings/site_settings/add_site_dialog.js
+++ b/chrome/browser/resources/settings/site_settings/add_site_dialog.js
@@ -25,6 +25,9 @@ Polymer({
*/
contentSetting: String,
+ /** @private */
+ isIncognitoActive_: Boolean,
+
/**
* The site to add an exception for.
* @private
@@ -44,8 +47,9 @@ Polymer({
* Block list.
*/
open: function(type) {
- this.addWebUIListener('onIncognitoStatusChanged',
- this.onIncognitoStatusChanged_.bind(this));
+ this.addWebUIListener('onIncognitoStatusChanged', function(isActive) {
+ this.isIncognitoActive_ = isActive;
+ }.bind(this));
this.browserProxy.updateIncognitoStatus();
this.$.dialog.showModal();
},
@@ -75,19 +79,6 @@ Polymer({
},
/**
- * A handler for when we get notified of the current profile creating or
- * destroying their incognito counterpart.
- * @param {boolean} incognitoEnabled Whether the current profile has an
- * incognito profile.
- * @private
- */
- onIncognitoStatusChanged_: function(incognitoEnabled) {
- this.$.incognito.disabled = !incognitoEnabled;
- if (!incognitoEnabled)
- this.$.incognito.checked = false;
- },
-
- /**
* The tap handler for the Add [Site] button (adds the pattern and closes
* the dialog).
* @private

Powered by Google App Engine
This is Rietveld 408576698