| 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-site-settings-page' is the settings page containing privacy and | 7 * 'settings-site-settings-page' is the settings page containing privacy and |
| 8 * security site settings. | 8 * security site settings. |
| 9 */ | 9 */ |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 this.setDefaultValue_(this.ContentSettingsTypes.POPUPS, '#popups'); | 46 this.setDefaultValue_(this.ContentSettingsTypes.POPUPS, '#popups'); |
| 47 this.setDefaultValue_(this.ContentSettingsTypes.PROTOCOL_HANDLERS, | 47 this.setDefaultValue_(this.ContentSettingsTypes.PROTOCOL_HANDLERS, |
| 48 '#handlers'); | 48 '#handlers'); |
| 49 this.setDefaultValue_(this.ContentSettingsTypes.UNSANDBOXED_PLUGINS, | 49 this.setDefaultValue_(this.ContentSettingsTypes.UNSANDBOXED_PLUGINS, |
| 50 '#unsandboxedPlugins'); | 50 '#unsandboxedPlugins'); |
| 51 }, | 51 }, |
| 52 | 52 |
| 53 setDefaultValue_: function(category, id) { | 53 setDefaultValue_: function(category, id) { |
| 54 this.browserProxy.getDefaultValueForContentType( | 54 this.browserProxy.getDefaultValueForContentType( |
| 55 category).then(function(setting) { | 55 category).then(function(setting) { |
| 56 var enabled = this.computeIsSettingEnabled(category, setting); | 56 var description = this.computeCategoryDesc(category, setting, false); |
| 57 var description = this.computeCategoryDesc(category, enabled, false); | |
| 58 this.$$(id).innerText = description; | 57 this.$$(id).innerText = description; |
| 59 }.bind(this)); | 58 }.bind(this)); |
| 60 }, | 59 }, |
| 61 | 60 |
| 62 /** | 61 /** |
| 63 * Handles selection of a single category and navigates to the details for | 62 * Handles selection of a single category and navigates to the details for |
| 64 * that category. | 63 * that category. |
| 65 * @param {!Event} event The tap event. | 64 * @param {!Event} event The tap event. |
| 66 */ | 65 */ |
| 67 onTapCategory: function(event) { | 66 onTapCategory: function(event) { |
| 68 var category = event.currentTarget.getAttribute('category'); | 67 var category = event.currentTarget.getAttribute('category'); |
| 69 if (category == settings.ALL_SITES) | 68 if (category == settings.ALL_SITES) |
| 70 settings.navigateTo(settings.Route.SITE_SETTINGS_ALL); | 69 settings.navigateTo(settings.Route.SITE_SETTINGS_ALL); |
| 71 else | 70 else |
| 72 settings.navigateTo(this.computeCategoryRoute(category)); | 71 settings.navigateTo(this.computeCategoryRoute(category)); |
| 73 }, | 72 }, |
| 74 }); | 73 }); |
| OLD | NEW |