| 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({ |
| 11 is: 'settings-privacy-page', | 11 is: 'settings-privacy-page', |
| 12 | 12 |
| 13 behaviors: [ | 13 behaviors: [ |
| 14 settings.RouteObserverBehavior, | 14 settings.RouteObserverBehavior, |
| 15 I18nBehavior, |
| 15 WebUIListenerBehavior, | 16 WebUIListenerBehavior, |
| 16 ], | 17 ], |
| 17 | 18 |
| 18 properties: { | 19 properties: { |
| 19 /** | 20 /** |
| 20 * Preferences state. | 21 * Preferences state. |
| 21 */ | 22 */ |
| 22 prefs: { | 23 prefs: { |
| 23 type: Object, | 24 type: Object, |
| 24 notify: true, | 25 notify: true, |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 }, | 168 }, |
| 168 | 169 |
| 169 // <if expr="chromeos"> | 170 // <if expr="chromeos"> |
| 170 /** @private */ | 171 /** @private */ |
| 171 onAdobeFlashStorageClicked_: function() { | 172 onAdobeFlashStorageClicked_: function() { |
| 172 window.open('https://www.macromedia.com/support/' + | 173 window.open('https://www.macromedia.com/support/' + |
| 173 'documentation/en/flashplayer/help/settings_manager07.html'); | 174 'documentation/en/flashplayer/help/settings_manager07.html'); |
| 174 }, | 175 }, |
| 175 // </if> | 176 // </if> |
| 176 | 177 |
| 177 /** | 178 /** @private */ |
| 178 * Works like a ternary operator. E.g. (value ? trueLabel: falseLabel). | 179 getProtectedContentLabel_: function(value) { |
| 179 * @param {boolean} value | 180 return value ? this.i18n('siteSettingsProtectedContentEnable') |
| 180 * @param {string} trueLabel True label (for example, 'Allow DRM'). | 181 : this.i18n('siteSettingsBlocked'); |
| 181 * @param {string} falseLabel False label (for example, 'Blocked'). | 182 }, |
| 182 * @private | 183 |
| 183 */ | 184 /** @private */ |
| 184 getStringTernary_: function(value, trueLabel, falseLabel) { | 185 getProtectedContentIdentifiersLabel_: function(value) { |
| 185 return value ? trueLabel : falseLabel; | 186 return value ? this.i18n('siteSettingsProtectedContentEnableIdentifiers') |
| 187 : this.i18n('siteSettingsBlocked'); |
| 186 }, | 188 }, |
| 187 }); | 189 }); |
| OLD | NEW |