| 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 Behavior common to Site Settings classes. | 6 * @fileoverview Behavior common to Site Settings classes. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 /** @polymerBehavior */ | 9 /** @polymerBehavior */ |
| 10 var SiteSettingsBehaviorImpl = { | 10 var SiteSettingsBehaviorImpl = { |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 return loadTimeData.getString('siteSettingsFlashAskBefore'); | 112 return loadTimeData.getString('siteSettingsFlashAskBefore'); |
| 113 case settings.ContentSettingsTypes.BACKGROUND_SYNC: | 113 case settings.ContentSettingsTypes.BACKGROUND_SYNC: |
| 114 // "Allow sites to finish sending and receiving data" vs "Do not allow". | 114 // "Allow sites to finish sending and receiving data" vs "Do not allow". |
| 115 if (!categoryEnabled) { | 115 if (!categoryEnabled) { |
| 116 return loadTimeData.getString('siteSettingsBackgroundSyncBlocked'); | 116 return loadTimeData.getString('siteSettingsBackgroundSyncBlocked'); |
| 117 } | 117 } |
| 118 return showRecommendation ? | 118 return showRecommendation ? |
| 119 loadTimeData.getString( | 119 loadTimeData.getString( |
| 120 'siteSettingsAllowRecentlyClosedSitesRecommended') : | 120 'siteSettingsAllowRecentlyClosedSitesRecommended') : |
| 121 loadTimeData.getString('siteSettingsAllowRecentlyClosedSites'); | 121 loadTimeData.getString('siteSettingsAllowRecentlyClosedSites'); |
| 122 case settings.ContentSettingsTypes.KEYGEN: | |
| 123 // "Allow sites to use keygen" vs "Do not allow". | |
| 124 if (categoryEnabled) { | |
| 125 return loadTimeData.getString('siteSettingsKeygenAllow'); | |
| 126 } | |
| 127 return showRecommendation ? | |
| 128 loadTimeData.getString('siteSettingsKeygenBlockRecommended') : | |
| 129 loadTimeData.getString('siteSettingsKeygenBlock'); | |
| 130 case settings.ContentSettingsTypes.AUTOMATIC_DOWNLOADS: | 122 case settings.ContentSettingsTypes.AUTOMATIC_DOWNLOADS: |
| 131 // "Ask when a site wants to auto-download multiple" vs "Do not allow". | 123 // "Ask when a site wants to auto-download multiple" vs "Do not allow". |
| 132 if (!categoryEnabled) { | 124 if (!categoryEnabled) { |
| 133 return loadTimeData.getString('siteSettingsAutoDownloadBlock'); | 125 return loadTimeData.getString('siteSettingsAutoDownloadBlock'); |
| 134 } | 126 } |
| 135 return showRecommendation ? | 127 return showRecommendation ? |
| 136 loadTimeData.getString('siteSettingsAutoDownloadAskRecommended') : | 128 loadTimeData.getString('siteSettingsAutoDownloadAskRecommended') : |
| 137 loadTimeData.getString('siteSettingsAutoDownloadAsk'); | 129 loadTimeData.getString('siteSettingsAutoDownloadAsk'); |
| 138 case settings.ContentSettingsTypes.UNSANDBOXED_PLUGINS: | 130 case settings.ContentSettingsTypes.UNSANDBOXED_PLUGINS: |
| 139 // "Ask when a plugin accesses your computer" vs "Do not allow". | 131 // "Ask when a plugin accesses your computer" vs "Do not allow". |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 incognito: exception.incognito, | 296 incognito: exception.incognito, |
| 305 setting: exception.setting, | 297 setting: exception.setting, |
| 306 source: exception.source, | 298 source: exception.source, |
| 307 }; | 299 }; |
| 308 }, | 300 }, |
| 309 | 301 |
| 310 }; | 302 }; |
| 311 | 303 |
| 312 /** @polymerBehavior */ | 304 /** @polymerBehavior */ |
| 313 var SiteSettingsBehavior = [SiteSettingsBehaviorImpl]; | 305 var SiteSettingsBehavior = [SiteSettingsBehaviorImpl]; |
| OLD | NEW |