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