| 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 if (!loadTimeData.getBoolean('newContentSettings')) { | 5 if (!loadTimeData.getBoolean('newContentSettings')) { |
| 6 | 6 |
| 7 cr.define('options', function() { | 7 cr.define('options', function() { |
| 8 /** @const */ var OptionsPage = options.OptionsPage; | 8 /** @const */ var OptionsPage = options.OptionsPage; |
| 9 | 9 |
| 10 ////////////////////////////////////////////////////////////////////////////// | 10 ////////////////////////////////////////////////////////////////////////////// |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // Create a synthetic pref change event decorated as | 118 // Create a synthetic pref change event decorated as |
| 119 // CoreOptionsHandler::CreateValueForPref() does. | 119 // CoreOptionsHandler::CreateValueForPref() does. |
| 120 var event = new cr.Event(group); | 120 var event = new cr.Event(group); |
| 121 event.value = { | 121 event.value = { |
| 122 value: dict[group].value, | 122 value: dict[group].value, |
| 123 controlledBy: controlledBy, | 123 controlledBy: controlledBy, |
| 124 }; | 124 }; |
| 125 for (var i = 0; i < indicators.length; i++) | 125 for (var i = 0; i < indicators.length; i++) |
| 126 indicators[i].handlePrefChange(event); | 126 indicators[i].handlePrefChange(event); |
| 127 } | 127 } |
| 128 OptionsPage.updateManagedBannerVisibility(); | |
| 129 }; | 128 }; |
| 130 | 129 |
| 131 /** | 130 /** |
| 132 * Initializes an exceptions list. | 131 * Initializes an exceptions list. |
| 133 * @param {string} type The content type that we are setting exceptions for. | 132 * @param {string} type The content type that we are setting exceptions for. |
| 134 * @param {Array} list An array of pairs, where the first element of each pair | 133 * @param {Array} list An array of pairs, where the first element of each pair |
| 135 * is the filter string, and the second is the setting (allow/block). | 134 * is the filter string, and the second is the setting (allow/block). |
| 136 */ | 135 */ |
| 137 ContentSettings.setExceptions = function(type, list) { | 136 ContentSettings.setExceptions = function(type, list) { |
| 138 var exceptionsList = | 137 var exceptionsList = |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } | 185 } |
| 187 | 186 |
| 188 // Export | 187 // Export |
| 189 return { | 188 return { |
| 190 ContentSettings: ContentSettings | 189 ContentSettings: ContentSettings |
| 191 }; | 190 }; |
| 192 | 191 |
| 193 }); | 192 }); |
| 194 | 193 |
| 195 } | 194 } |
| OLD | NEW |