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

Unified Diff: chrome/browser/resources/settings/system_page/system_page.js

Issue 2971163002: Add local protection setting to chrome://settings/system
Patch Set: linux-only Created 3 years, 5 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/system_page/system_page.js
diff --git a/chrome/browser/resources/settings/system_page/system_page.js b/chrome/browser/resources/settings/system_page/system_page.js
index b03f680f092546bcc1153a1eb46a0d0477411d01..812c6decac0318040bb09cd04dd860e90360d8dc 100644
--- a/chrome/browser/resources/settings/system_page/system_page.js
+++ b/chrome/browser/resources/settings/system_page/system_page.js
@@ -21,6 +21,34 @@ Polymer({
type: Boolean,
computed: 'computeIsProxyEnforcedByPolicy_(prefs.proxy.*)',
},
+
+ hideProtection_: {
+ type: Boolean,
+ value: true,
+ },
+
+ /** @private {chrome.settingsPrivate.PrefObject} */
+ protectionPref_: {
+ type: Object,
+ }
+ },
+
+ /** @override */
+ ready: function() {
+ this.proxy_ = settings.SystemPageBrowserProxyImpl.getInstance();
+
+ this.hideProtection_ = this.proxy_.hideProtectionSetting();
+
+ this.protectionPref_ = {
+ key: '',
+ type: chrome.settingsPrivate.PrefType.BOOLEAN,
+ value: this.proxy_.protectionSetting(),
+ };
+ },
+
+ onProtectionChange_: function() {
+ var enabled = this.$.protectionControl.checked;
+ this.proxy_.setProtectionSetting(enabled);
},
/**

Powered by Google App Engine
This is Rietveld 408576698