| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 const OptionsPage = options.OptionsPage; | 6 const OptionsPage = options.OptionsPage; |
| 7 | 7 |
| 8 ////////////////////////////////////////////////////////////////////////////// | 8 ////////////////////////////////////////////////////////////////////////////// |
| 9 // ContentSettings class: | 9 // ContentSettings class: |
| 10 | 10 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 radios[i].controlledBy = managedBy; | 153 radios[i].controlledBy = managedBy; |
| 154 } | 154 } |
| 155 } | 155 } |
| 156 // Keep track of the real cookie content setting. (The UI might override it | 156 // Keep track of the real cookie content setting. (The UI might override it |
| 157 // if the reopen last pages setting is selected.) | 157 // if the reopen last pages setting is selected.) |
| 158 if ('cookies' in dict && 'value' in dict['cookies']) { | 158 if ('cookies' in dict && 'value' in dict['cookies']) { |
| 159 ContentSettings.getInstance().cookiesSession = | 159 ContentSettings.getInstance().cookiesSession = |
| 160 (dict['cookies']['value'] == 'session'); | 160 (dict['cookies']['value'] == 'session'); |
| 161 } | 161 } |
| 162 ContentSettings.getInstance().updateSessionRestoreContentSettings(); | 162 ContentSettings.getInstance().updateSessionRestoreContentSettings(); |
| 163 OptionsPage.updateManagedBannerVisibility(); | 163 BrowserOptions.updateManagedBannerVisibility(); |
| 164 }; | 164 }; |
| 165 | 165 |
| 166 /** | 166 /** |
| 167 * Initializes an exceptions list. | 167 * Initializes an exceptions list. |
| 168 * @param {string} type The content type that we are setting exceptions for. | 168 * @param {string} type The content type that we are setting exceptions for. |
| 169 * @param {Array} list An array of pairs, where the first element of each pair | 169 * @param {Array} list An array of pairs, where the first element of each pair |
| 170 * is the filter string, and the second is the setting (allow/block). | 170 * is the filter string, and the second is the setting (allow/block). |
| 171 */ | 171 */ |
| 172 ContentSettings.setExceptions = function(type, list) { | 172 ContentSettings.setExceptions = function(type, list) { |
| 173 var exceptionsList = | 173 var exceptionsList = |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 'list[mode=' + mode + ']'); | 209 'list[mode=' + mode + ']'); |
| 210 exceptionsList.patternValidityCheckComplete(pattern, valid); | 210 exceptionsList.patternValidityCheckComplete(pattern, valid); |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 // Export | 213 // Export |
| 214 return { | 214 return { |
| 215 ContentSettings: ContentSettings | 215 ContentSettings: ContentSettings |
| 216 }; | 216 }; |
| 217 | 217 |
| 218 }); | 218 }); |
| OLD | NEW |