| 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 /** | 41 /** |
| 42 * Dictionary defining page visibility. | 42 * Dictionary defining page visibility. |
| 43 * @type {!PrivacyPageVisibility} | 43 * @type {!PrivacyPageVisibility} |
| 44 */ | 44 */ |
| 45 pageVisibility: Object, | 45 pageVisibility: Object, |
| 46 | 46 |
| 47 /** @private */ | 47 /** @private */ |
| 48 isGuest_: { | 48 isGuest_: { |
| 49 type: Boolean, | 49 type: Boolean, |
| 50 value: function() { return loadTimeData.getBoolean('isGuest'); } | 50 value: function() { |
| 51 return loadTimeData.getBoolean('isGuest'); |
| 52 } |
| 51 }, | 53 }, |
| 52 | 54 |
| 53 // <if expr="_google_chrome and not chromeos"> | 55 // <if expr="_google_chrome and not chromeos"> |
| 54 // TODO(dbeam): make a virtual.* pref namespace and set/get this normally | 56 // TODO(dbeam): make a virtual.* pref namespace and set/get this normally |
| 55 // (but handled differently in C++). | 57 // (but handled differently in C++). |
| 56 /** @private {chrome.settingsPrivate.PrefObject} */ | 58 /** @private {chrome.settingsPrivate.PrefObject} */ |
| 57 metricsReportingPref_: { | 59 metricsReportingPref_: { |
| 58 type: Object, | 60 type: Object, |
| 59 value: function() { | 61 value: function() { |
| 60 // TODO(dbeam): this is basically only to appease PrefControlBehavior. | 62 // TODO(dbeam): this is basically only to appease PrefControlBehavior. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 '#site-settings-subpage-trigger .subpage-arrow'); | 119 '#site-settings-subpage-trigger .subpage-arrow'); |
| 118 return map; | 120 return map; |
| 119 }, | 121 }, |
| 120 }, | 122 }, |
| 121 }, | 123 }, |
| 122 | 124 |
| 123 listeners: { | 125 listeners: { |
| 124 'doNotTrackDialogIf.dom-change': 'onDoNotTrackDomChange_', | 126 'doNotTrackDialogIf.dom-change': 'onDoNotTrackDomChange_', |
| 125 }, | 127 }, |
| 126 | 128 |
| 129 /** @override */ |
| 127 ready: function() { | 130 ready: function() { |
| 128 this.ContentSettingsTypes = settings.ContentSettingsTypes; | 131 this.ContentSettingsTypes = settings.ContentSettingsTypes; |
| 129 | 132 |
| 130 this.browserProxy_ = settings.PrivacyPageBrowserProxyImpl.getInstance(); | 133 this.browserProxy_ = settings.PrivacyPageBrowserProxyImpl.getInstance(); |
| 131 | 134 |
| 132 // <if expr="_google_chrome and not chromeos"> | 135 // <if expr="_google_chrome and not chromeos"> |
| 133 var setMetricsReportingPref = this.setMetricsReportingPref_.bind(this); | 136 var setMetricsReportingPref = this.setMetricsReportingPref_.bind(this); |
| 134 this.addWebUIListener('metrics-reporting-change', setMetricsReportingPref); | 137 this.addWebUIListener('metrics-reporting-change', setMetricsReportingPref); |
| 135 this.browserProxy_.getMetricsReporting().then(setMetricsReportingPref); | 138 this.browserProxy_.getMetricsReporting().then(setMetricsReportingPref); |
| 136 // </if> | 139 // </if> |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 : this.i18n('siteSettingsBlocked'); | 328 : this.i18n('siteSettingsBlocked'); |
| 326 }, | 329 }, |
| 327 | 330 |
| 328 /** @private */ | 331 /** @private */ |
| 329 getProtectedContentIdentifiersLabel_: function(value) { | 332 getProtectedContentIdentifiersLabel_: function(value) { |
| 330 return value ? this.i18n('siteSettingsProtectedContentEnableIdentifiers') | 333 return value ? this.i18n('siteSettingsProtectedContentEnableIdentifiers') |
| 331 : this.i18n('siteSettingsBlocked'); | 334 : this.i18n('siteSettingsBlocked'); |
| 332 }, | 335 }, |
| 333 }); | 336 }); |
| 334 })(); | 337 })(); |
| OLD | NEW |