| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 * 'category-default-setting' is the polymer element for showing a certain | 7 * 'category-default-setting' is the polymer element for showing a certain |
| 8 * category under Site Settings. | 8 * category under Site Settings. |
| 9 */ | 9 */ |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 /** | 58 /** |
| 59 * A handler for changing the default permission value for a content type. | 59 * A handler for changing the default permission value for a content type. |
| 60 * @private | 60 * @private |
| 61 */ | 61 */ |
| 62 onChangePermissionControl_: function() { | 62 onChangePermissionControl_: function() { |
| 63 switch (this.category) { | 63 switch (this.category) { |
| 64 case settings.ContentSettingsTypes.BACKGROUND_SYNC: | 64 case settings.ContentSettingsTypes.BACKGROUND_SYNC: |
| 65 case settings.ContentSettingsTypes.IMAGES: | 65 case settings.ContentSettingsTypes.IMAGES: |
| 66 case settings.ContentSettingsTypes.JAVASCRIPT: | 66 case settings.ContentSettingsTypes.JAVASCRIPT: |
| 67 case settings.ContentSettingsTypes.KEYGEN: | |
| 68 case settings.ContentSettingsTypes.POPUPS: | 67 case settings.ContentSettingsTypes.POPUPS: |
| 69 case settings.ContentSettingsTypes.PROTOCOL_HANDLERS: | 68 case settings.ContentSettingsTypes.PROTOCOL_HANDLERS: |
| 70 // "Allowed" vs "Blocked". | 69 // "Allowed" vs "Blocked". |
| 71 this.browserProxy.setDefaultValueForContentType( | 70 this.browserProxy.setDefaultValueForContentType( |
| 72 this.category, | 71 this.category, |
| 73 this.categoryEnabled ? | 72 this.categoryEnabled ? |
| 74 settings.PermissionValues.ALLOW : | 73 settings.PermissionValues.ALLOW : |
| 75 settings.PermissionValues.BLOCK); | 74 settings.PermissionValues.BLOCK); |
| 76 break; | 75 break; |
| 77 case settings.ContentSettingsTypes.AUTOMATIC_DOWNLOADS: | 76 case settings.ContentSettingsTypes.AUTOMATIC_DOWNLOADS: |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 } else if ( | 146 } else if ( |
| 148 this.category == settings.ContentSettingsTypes.COOKIES) { | 147 this.category == settings.ContentSettingsTypes.COOKIES) { |
| 149 if (setting == settings.PermissionValues.ALLOW) | 148 if (setting == settings.PermissionValues.ALLOW) |
| 150 this.subOptionEnabled_ = false; | 149 this.subOptionEnabled_ = false; |
| 151 else if (setting == settings.PermissionValues.SESSION_ONLY) | 150 else if (setting == settings.PermissionValues.SESSION_ONLY) |
| 152 this.subOptionEnabled_ = true; | 151 this.subOptionEnabled_ = true; |
| 153 } | 152 } |
| 154 }.bind(this)); | 153 }.bind(this)); |
| 155 }, | 154 }, |
| 156 }); | 155 }); |
| OLD | NEW |