| 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 | |
| 23 Polymer({ | 10 Polymer({ |
| 24 is: 'settings-privacy-page', | 11 is: 'settings-privacy-page', |
| 25 | 12 |
| 26 behaviors: [ | 13 behaviors: [ |
| 27 settings.RouteObserverBehavior, | 14 settings.RouteObserverBehavior, |
| 28 I18nBehavior, | 15 I18nBehavior, |
| 29 WebUIListenerBehavior, | 16 WebUIListenerBehavior, |
| 30 ], | 17 ], |
| 31 | 18 |
| 32 properties: { | 19 properties: { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 49 metricsReporting_: Object, | 36 metricsReporting_: Object, |
| 50 | 37 |
| 51 showRestart_: Boolean, | 38 showRestart_: Boolean, |
| 52 // </if> | 39 // </if> |
| 53 | 40 |
| 54 /** @private */ | 41 /** @private */ |
| 55 safeBrowsingExtendedReportingEnabled_: Boolean, | 42 safeBrowsingExtendedReportingEnabled_: Boolean, |
| 56 | 43 |
| 57 /** @private */ | 44 /** @private */ |
| 58 showClearBrowsingDataDialog_: Boolean, | 45 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 }, | |
| 70 }, | 46 }, |
| 71 | 47 |
| 72 ready: function() { | 48 ready: function() { |
| 73 this.ContentSettingsTypes = settings.ContentSettingsTypes; | 49 this.ContentSettingsTypes = settings.ContentSettingsTypes; |
| 74 | 50 |
| 75 // <if expr="_google_chrome and not chromeos"> | 51 // <if expr="_google_chrome and not chromeos"> |
| 76 var boundSetMetricsReporting = this.setMetricsReporting_.bind(this); | 52 var boundSetMetricsReporting = this.setMetricsReporting_.bind(this); |
| 77 this.addWebUIListener('metrics-reporting-change', boundSetMetricsReporting); | 53 this.addWebUIListener('metrics-reporting-change', boundSetMetricsReporting); |
| 78 | 54 |
| 79 var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); | 55 var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 return value ? this.i18n('siteSettingsProtectedContentEnable') | 180 return value ? this.i18n('siteSettingsProtectedContentEnable') |
| 205 : this.i18n('siteSettingsBlocked'); | 181 : this.i18n('siteSettingsBlocked'); |
| 206 }, | 182 }, |
| 207 | 183 |
| 208 /** @private */ | 184 /** @private */ |
| 209 getProtectedContentIdentifiersLabel_: function(value) { | 185 getProtectedContentIdentifiersLabel_: function(value) { |
| 210 return value ? this.i18n('siteSettingsProtectedContentEnableIdentifiers') | 186 return value ? this.i18n('siteSettingsProtectedContentEnableIdentifiers') |
| 211 : this.i18n('siteSettingsBlocked'); | 187 : this.i18n('siteSettingsBlocked'); |
| 212 }, | 188 }, |
| 213 }); | 189 }); |
| 214 })(); | |
| OLD | NEW |