| 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() { |
| 11 |
| 12 /** |
| 13 * Must be kept in sync with the C++ enum of the same name. |
| 14 * @enum {number} |
| 15 */ |
| 16 var NetworkPredictionOptions = { |
| 17 ALWAYS: 0, |
| 18 WIFI_ONLY: 1, |
| 19 NEVER: 2, |
| 20 DEFAULT: 1 |
| 21 }; |
| 22 |
| 10 Polymer({ | 23 Polymer({ |
| 11 is: 'settings-privacy-page', | 24 is: 'settings-privacy-page', |
| 12 | 25 |
| 13 behaviors: [ | 26 behaviors: [ |
| 14 settings.RouteObserverBehavior, | 27 settings.RouteObserverBehavior, |
| 15 I18nBehavior, | 28 I18nBehavior, |
| 16 WebUIListenerBehavior, | 29 WebUIListenerBehavior, |
| 17 ], | 30 ], |
| 18 | 31 |
| 19 properties: { | 32 properties: { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 36 metricsReporting_: Object, | 49 metricsReporting_: Object, |
| 37 | 50 |
| 38 showRestart_: Boolean, | 51 showRestart_: Boolean, |
| 39 // </if> | 52 // </if> |
| 40 | 53 |
| 41 /** @private */ | 54 /** @private */ |
| 42 safeBrowsingExtendedReportingEnabled_: Boolean, | 55 safeBrowsingExtendedReportingEnabled_: Boolean, |
| 43 | 56 |
| 44 /** @private */ | 57 /** @private */ |
| 45 showClearBrowsingDataDialog_: Boolean, | 58 showClearBrowsingDataDialog_: Boolean, |
| 59 |
| 60 /** |
| 61 * Used for HTML bindings. This is defined as a property rather than within |
| 62 * the ready callback, because the value needs to be available before |
| 63 * local DOM initialization - otherwise, the toggle has unexpected behavior. |
| 64 * @private |
| 65 */ |
| 66 networkPredictionEnum_: { |
| 67 type: Object, |
| 68 value: NetworkPredictionOptions, |
| 69 }, |
| 46 }, | 70 }, |
| 47 | 71 |
| 48 ready: function() { | 72 ready: function() { |
| 49 this.ContentSettingsTypes = settings.ContentSettingsTypes; | 73 this.ContentSettingsTypes = settings.ContentSettingsTypes; |
| 50 | 74 |
| 51 // <if expr="_google_chrome and not chromeos"> | 75 // <if expr="_google_chrome and not chromeos"> |
| 52 var boundSetMetricsReporting = this.setMetricsReporting_.bind(this); | 76 var boundSetMetricsReporting = this.setMetricsReporting_.bind(this); |
| 53 this.addWebUIListener('metrics-reporting-change', boundSetMetricsReporting); | 77 this.addWebUIListener('metrics-reporting-change', boundSetMetricsReporting); |
| 54 | 78 |
| 55 var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); | 79 var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 return value ? this.i18n('siteSettingsProtectedContentEnable') | 204 return value ? this.i18n('siteSettingsProtectedContentEnable') |
| 181 : this.i18n('siteSettingsBlocked'); | 205 : this.i18n('siteSettingsBlocked'); |
| 182 }, | 206 }, |
| 183 | 207 |
| 184 /** @private */ | 208 /** @private */ |
| 185 getProtectedContentIdentifiersLabel_: function(value) { | 209 getProtectedContentIdentifiersLabel_: function(value) { |
| 186 return value ? this.i18n('siteSettingsProtectedContentEnableIdentifiers') | 210 return value ? this.i18n('siteSettingsProtectedContentEnableIdentifiers') |
| 187 : this.i18n('siteSettingsBlocked'); | 211 : this.i18n('siteSettingsBlocked'); |
| 188 }, | 212 }, |
| 189 }); | 213 }); |
| 214 })(); |
| OLD | NEW |