| 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 (function() { | 10 (function() { |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 this.addWebUIListener('safe-browsing-extended-reporting-change', setSber); | 104 this.addWebUIListener('safe-browsing-extended-reporting-change', setSber); |
| 105 this.browserProxy_.getSafeBrowsingExtendedReporting().then(setSber); | 105 this.browserProxy_.getSafeBrowsingExtendedReporting().then(setSber); |
| 106 }, | 106 }, |
| 107 | 107 |
| 108 /** @protected */ | 108 /** @protected */ |
| 109 currentRouteChanged: function() { | 109 currentRouteChanged: function() { |
| 110 this.showClearBrowsingDataDialog_ = | 110 this.showClearBrowsingDataDialog_ = |
| 111 settings.getCurrentRoute() == settings.Route.CLEAR_BROWSER_DATA; | 111 settings.getCurrentRoute() == settings.Route.CLEAR_BROWSER_DATA; |
| 112 }, | 112 }, |
| 113 | 113 |
| 114 /** |
| 115 * Handles the change event for the do-not-track toggle. Shows a |
| 116 * confirmation dialog. |
| 117 * @param {Event} event |
| 118 * @private |
| 119 */ |
| 120 onDoNotTrackChange_: function(event) { |
| 121 this.$.confirmDoNotTrackDialog.showModal(); |
| 122 }, |
| 123 |
| 124 /** |
| 125 * Handles the shared proxy confirmation dialog 'Confirm' button. |
| 126 * @private |
| 127 */ |
| 128 onDoNotTrackDialogConfirm_: function() { |
| 129 /** @type {!SettingsToggleButtonElement} */ (this.$.doNotTrack) |
| 130 .sendPrefChange(); |
| 131 this.$.confirmDoNotTrackDialog.close(); |
| 132 }, |
| 133 |
| 134 /** |
| 135 * Handles the shared proxy confirmation dialog 'Cancel' button or a cancel |
| 136 * event. |
| 137 * @private |
| 138 */ |
| 139 onDoNotTrackDialogCancel_: function() { |
| 140 /** @type {!SettingsToggleButtonElement} */ (this.$.doNotTrack) |
| 141 .resetToPrefValue(); |
| 142 this.$.confirmDoNotTrackDialog.close(); |
| 143 }, |
| 144 |
| 114 /** @private */ | 145 /** @private */ |
| 115 onManageCertificatesTap_: function() { | 146 onManageCertificatesTap_: function() { |
| 116 // <if expr="use_nss_certs"> | 147 // <if expr="use_nss_certs"> |
| 117 settings.navigateTo(settings.Route.CERTIFICATES); | 148 settings.navigateTo(settings.Route.CERTIFICATES); |
| 118 // </if> | 149 // </if> |
| 119 // <if expr="is_win or is_macosx"> | 150 // <if expr="is_win or is_macosx"> |
| 120 this.browserProxy_.showManageSSLCertificates(); | 151 this.browserProxy_.showManageSSLCertificates(); |
| 121 // </if> | 152 // </if> |
| 122 }, | 153 }, |
| 123 | 154 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 : this.i18n('siteSettingsBlocked'); | 272 : this.i18n('siteSettingsBlocked'); |
| 242 }, | 273 }, |
| 243 | 274 |
| 244 /** @private */ | 275 /** @private */ |
| 245 getProtectedContentIdentifiersLabel_: function(value) { | 276 getProtectedContentIdentifiersLabel_: function(value) { |
| 246 return value ? this.i18n('siteSettingsProtectedContentEnableIdentifiers') | 277 return value ? this.i18n('siteSettingsProtectedContentEnableIdentifiers') |
| 247 : this.i18n('siteSettingsBlocked'); | 278 : this.i18n('siteSettingsBlocked'); |
| 248 }, | 279 }, |
| 249 }); | 280 }); |
| 250 })(); | 281 })(); |
| OLD | NEW |