| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * 'settings-privacy-page' is the settings page containing privacy and | 7 * 'settings-privacy-page' is the settings page containing privacy and |
| 8 * security settings. | 8 * security settings. |
| 9 */ | 9 */ |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 /** @private */ | 138 /** @private */ |
| 139 onRestartTap_: function() { | 139 onRestartTap_: function() { |
| 140 settings.LifetimeBrowserProxyImpl.getInstance().restart(); | 140 settings.LifetimeBrowserProxyImpl.getInstance().restart(); |
| 141 }, | 141 }, |
| 142 // </if> | 142 // </if> |
| 143 | 143 |
| 144 /** @private */ | 144 /** @private */ |
| 145 onSafeBrowsingExtendedReportingControlTap_: function() { | 145 onSafeBrowsingExtendedReportingControlTap_: function() { |
| 146 var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); | 146 var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); |
| 147 var enabled = this.$.safeBrowsingExtendedReportingControl.checked; | 147 var enabled = !this.safeBrowsingExtendedReportingEnabled_; |
| 148 browserProxy.setSafeBrowsingExtendedReportingEnabled(enabled); | 148 browserProxy.setSafeBrowsingExtendedReportingEnabled(enabled); |
| 149 }, | 149 }, |
| 150 | 150 |
| 151 /** @param {boolean} enabled Whether reporting is enabled or not. | 151 /** @param {boolean} enabled Whether reporting is enabled or not. |
| 152 * @private | 152 * @private |
| 153 */ | 153 */ |
| 154 setSafeBrowsingExtendedReporting_: function(enabled) { | 154 setSafeBrowsingExtendedReporting_: function(enabled) { |
| 155 this.safeBrowsingExtendedReportingEnabled_ = enabled; | 155 this.safeBrowsingExtendedReportingEnabled_ = enabled; |
| 156 }, | 156 }, |
| 157 | 157 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 178 * Works like a ternary operator. E.g. (value ? trueLabel: falseLabel). | 178 * Works like a ternary operator. E.g. (value ? trueLabel: falseLabel). |
| 179 * @param {boolean} value | 179 * @param {boolean} value |
| 180 * @param {string} trueLabel True label (for example, 'Allow DRM'). | 180 * @param {string} trueLabel True label (for example, 'Allow DRM'). |
| 181 * @param {string} falseLabel False label (for example, 'Blocked'). | 181 * @param {string} falseLabel False label (for example, 'Blocked'). |
| 182 * @private | 182 * @private |
| 183 */ | 183 */ |
| 184 getStringTernary_: function(value, trueLabel, falseLabel) { | 184 getStringTernary_: function(value, trueLabel, falseLabel) { |
| 185 return value ? trueLabel : falseLabel; | 185 return value ? trueLabel : falseLabel; |
| 186 }, | 186 }, |
| 187 }); | 187 }); |
| OLD | NEW |