Chromium Code Reviews| Index: chrome/browser/resources/settings/site_settings/site_settings_behavior.js |
| diff --git a/chrome/browser/resources/settings/site_settings/site_settings_behavior.js b/chrome/browser/resources/settings/site_settings/site_settings_behavior.js |
| index ed6538381e90506bb672c69fd1fa98f0ea446e3b..2912aa57603326e22e57d907ca4b95cb07039b5e 100644 |
| --- a/chrome/browser/resources/settings/site_settings/site_settings_behavior.js |
| +++ b/chrome/browser/resources/settings/site_settings/site_settings_behavior.js |
| @@ -248,13 +248,14 @@ var SiteSettingsBehaviorImpl = { |
| /** |
| * A utility function to compute the description for the category. |
| * @param {string} category The category to show the description for. |
| - * @param {boolean} categoryEnabled The state of the global toggle. |
| + * @param {string} setting The string value of the setting. |
| * @param {boolean} showRecommendation Whether to show the '(recommended)' |
| * label prefix. |
| * @return {string} The category description. |
| * @protected |
| */ |
| - computeCategoryDesc: function(category, categoryEnabled, showRecommendation) { |
| + computeCategoryDesc: function(category, setting, showRecommendation) { |
| + var categoryEnabled = this.computeIsSettingEnabled(category, setting); |
| switch (category) { |
| case settings.ContentSettingsTypes.JAVASCRIPT: |
| // "Allowed (recommended)" vs "Blocked". |
| @@ -315,14 +316,11 @@ var SiteSettingsBehaviorImpl = { |
| loadTimeData.getString('siteSettingsShowAllRecommended') : |
| loadTimeData.getString('siteSettingsShowAll'); |
| case settings.ContentSettingsTypes.PLUGINS: |
| - // "Detect and run important content (recommended)" vs "Let me choose". |
| - if (!categoryEnabled) { |
| - return loadTimeData.getString('siteSettingsLetMeChoose'); |
| - } |
| - return showRecommendation ? |
| - loadTimeData.getString( |
| - 'siteSettingsDetectAndRunImportantRecommended') : |
| - loadTimeData.getString('siteSettingsDetectAndRunImportant'); |
| + if (setting == settings.PermissionValues.ALLOW) |
| + return loadTimeData.getString('siteSettingsFlashAllow'); |
| + if (setting == settings.PermissionValues.BLOCK) |
| + return loadTimeData.getString('siteSettingsFlashBlock'); |
| + return loadTimeData.getString('siteSettingsFlashAskBefore'); |
|
Finnur
2016/08/30 10:58:11
Hmmm... I just noticed that when one presses Back
tommycli
2016/08/30 16:53:42
I noticed the same thing. Looking at the contents
|
| case settings.ContentSettingsTypes.BACKGROUND_SYNC: |
| // "Allow sites to finish sending and receiving data" vs "Do not allow". |
| if (!categoryEnabled) { |