| 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 * An example empty pref. | 6 * An example empty pref. |
| 7 * @type {SiteSettingsPref} | 7 * @type {SiteSettingsPref} |
| 8 */ | 8 */ |
| 9 var prefsEmpty = { | 9 var prefsEmpty = { |
| 10 defaults: { | 10 defaults: { |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 else if (contentType == settings.ContentSettingsTypes.JAVASCRIPT) | 185 else if (contentType == settings.ContentSettingsTypes.JAVASCRIPT) |
| 186 pref = this.prefs_.exceptions.javascript; | 186 pref = this.prefs_.exceptions.javascript; |
| 187 else if (contentType == settings.ContentSettingsTypes.MIC) | 187 else if (contentType == settings.ContentSettingsTypes.MIC) |
| 188 pref = this.prefs_.exceptions.mic; | 188 pref = this.prefs_.exceptions.mic; |
| 189 else if (contentType == settings.ContentSettingsTypes.NOTIFICATIONS) | 189 else if (contentType == settings.ContentSettingsTypes.NOTIFICATIONS) |
| 190 pref = this.prefs_.exceptions.notifications; | 190 pref = this.prefs_.exceptions.notifications; |
| 191 else if (contentType == settings.ContentSettingsTypes.PDF_DOCUMENTS) | 191 else if (contentType == settings.ContentSettingsTypes.PDF_DOCUMENTS) |
| 192 pref = this.prefs_.exceptions.pdf_documents; | 192 pref = this.prefs_.exceptions.pdf_documents; |
| 193 else if (contentType == settings.ContentSettingsTypes.PLUGINS) | 193 else if (contentType == settings.ContentSettingsTypes.PLUGINS) |
| 194 pref = this.prefs_.exceptions.plugins; | 194 pref = this.prefs_.exceptions.plugins; |
| 195 else if (contentType == settings.ContentSettingsTypes.PROTECTED_CONTENT) |
| 196 pref = this.prefs_.exceptions.protectedContent; |
| 195 else if (contentType == settings.ContentSettingsTypes.POPUPS) | 197 else if (contentType == settings.ContentSettingsTypes.POPUPS) |
| 196 pref = this.prefs_.exceptions.popups; | 198 pref = this.prefs_.exceptions.popups; |
| 197 else if (contentType == settings.ContentSettingsTypes.UNSANDBOXED_PLUGINS) | 199 else if (contentType == settings.ContentSettingsTypes.UNSANDBOXED_PLUGINS) |
| 198 pref = this.prefs_.exceptions.unsandboxed_plugins; | 200 pref = this.prefs_.exceptions.unsandboxed_plugins; |
| 199 else | 201 else |
| 200 console.log('getExceptionList received unknown category: ' + contentType); | 202 console.log('getExceptionList received unknown category: ' + contentType); |
| 201 | 203 |
| 202 assert(pref != undefined, 'Pref is missing for ' + contentType); | 204 assert(pref != undefined, 'Pref is missing for ' + contentType); |
| 203 return Promise.resolve(pref); | 205 return Promise.resolve(pref); |
| 204 }, | 206 }, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 /** @override */ | 259 /** @override */ |
| 258 setProtocolDefault: function() { | 260 setProtocolDefault: function() { |
| 259 this.methodCalled('setProtocolDefault', arguments); | 261 this.methodCalled('setProtocolDefault', arguments); |
| 260 }, | 262 }, |
| 261 | 263 |
| 262 /** @override */ | 264 /** @override */ |
| 263 removeProtocolHandler: function() { | 265 removeProtocolHandler: function() { |
| 264 this.methodCalled('removeProtocolHandler', arguments); | 266 this.methodCalled('removeProtocolHandler', arguments); |
| 265 } | 267 } |
| 266 }; | 268 }; |
| OLD | NEW |